FilePermissionAspect implements DataHandlerCheckModifyAccessListHookInterface

`DataHandler` hook handling to avoid direct access to `sys_file` related entities:

  • denies any write access to sys_file (in datamap and cmdmap, unless it is an internal process)
  • denies any write access to sys_file that is on legacy storage
  • denies any write access to sys_file_reference, referencing a file on legacy storage, or not part of the file-mounts of the corresponding user
  • denies any write access to sys_file_metadata, referencing a file on legacy storage, or not part of the file-mounts of the corresponding user

Table of Contents

Interfaces

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

Properties

$resourceFactory  : ResourceFactory

Methods

__construct()  : mixed
checkModifyAccessList()  : void
Denies write access to `sys_file` in general, unless it is an internal process.
processDatamap_preProcessFieldArray()  : void
Checks file related data being processed in `DataHandler`: + `sys_file` (only if `checkModifyAccessList` passed -> during internal process) + `sys_file_reference` + `sys_file_metadata`
isValidStorageData()  : bool
logError()  : void
resolveFile()  : File|null
resolveReferencedFile()  : File|null
resolveReferencedFiles()  : array<int, File|null>
usesDisallowedFileMount()  : bool
usesLegacyStorage()  : bool

Properties

Methods

checkModifyAccessList()

Denies write access to `sys_file` in general, unless it is an internal process.

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

processDatamap_preProcessFieldArray()

Checks file related data being processed in `DataHandler`: + `sys_file` (only if `checkModifyAccessList` passed -> during internal process) + `sys_file_reference` + `sys_file_metadata`

public processDatamap_preProcessFieldArray(mixed &$incomingFieldArray, string $table, int|string $id, DataHandler $dataHandler) : void
Parameters
$incomingFieldArray : mixed
$table : string
$id : int|string
$dataHandler : DataHandler

isValidStorageData()

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

logError()

protected logError(string $table, int $id, string $message, DataHandler $dataHandler) : void
Parameters
$table : string
$id : int
$message : string
$dataHandler : DataHandler

resolveFile()

protected resolveFile(int $fileId) : File|null
Parameters
$fileId : int
Return values
File|null

resolveReferencedFile()

protected resolveReferencedFile(array<string|int, mixed> $data, string $propertyName) : File|null
Parameters
$data : array<string|int, mixed>
$propertyName : string
Return values
File|null

resolveReferencedFiles()

protected resolveReferencedFiles(array<string|int, mixed> $data, string $propertyName) : array<int, File|null>
Parameters
$data : array<string|int, mixed>
$propertyName : string
Return values
array<int, File|null>

usesLegacyStorage()

protected usesLegacyStorage(File $file) : bool
Parameters
$file : File
Return values
bool

        
On this page

Search results