FileMetadataPermissionsAspect implements DataHandlerCheckModifyAccessListHookInterface

Read onlyYes

Dealing with file metadata data security is an assembly of hooks to check permissions on files belonging to file metadata records

Attributes
#[Autoconfigure]
$public: true

Table of Contents

Interfaces

DataHandlerCheckModifyAccessListHookInterface
Interface for hook in \TYPO3\CMS\Core\DataHandling\DataHandler::checkModifyAccessList

Methods

__construct()  : mixed
checkModifyAccessList()  : void
Hook that determines whether a user has access to modify a table.
checkRecordUpdateAccess()  : int|null
This hook is called before any write operation by DataHandler
isAllowedToShowEditForm()  : void
Deny access to the edit form. This is not mandatory, but better to show this right away that access is denied.
checkFileWriteAccessForFileMetaData()  : bool
Checks write access to the file belonging to a metadata entry

Methods

checkModifyAccessList()

Hook that determines whether a user has access to modify a table.

public checkModifyAccessList(bool &$accessAllowed, string $table, DataHandler $parent) : void

We "abuse" it here to actually check if access is allowed to sys_file_metadata.

Parameters
$accessAllowed : bool

Whether the user has access to modify a table

$table : string

The name of the table to be modified

$parent : DataHandler

The calling parent object

checkRecordUpdateAccess()

This hook is called before any write operation by DataHandler

public checkRecordUpdateAccess(string $table, int $id, array<string|int, mixed> $fileMetadataRecord, int|null $otherHookGrantedAccess, DataHandler $dataHandler) : int|null
Parameters
$table : string
$id : int
$fileMetadataRecord : array<string|int, mixed>
$otherHookGrantedAccess : int|null
$dataHandler : DataHandler
Return values
int|null

checkFileWriteAccessForFileMetaData()

Checks write access to the file belonging to a metadata entry

protected checkFileWriteAccessForFileMetaData(array<string|int, mixed> $fileMetadataRecord) : bool
Parameters
$fileMetadataRecord : array<string|int, mixed>
Return values
bool

        
On this page

Search results