DynamicFKAuthorization
class DynamicFKAuthorization implements EventSubscriberInterface
Given an entity which dynamically attaches itself to another entity, determine if one has permission to the other entity.
Example: Suppose one tries to manipulate a File which is attached to a Mailing. DynamicFKAuthorization will enforce permissions on the File by imitating the permissions of the Mailing.
Note: This enforces a constraint: all matching API calls must define "id" (e.g. for the file) or "entity_table+entity_id" or "field_name+entity_id".
Note: The permission guard does not exactly authorize the request, but it may veto authorization.
Properties
Kernel | $kernel | ||
protected string, | $entityName | ||
protected array | $actions | ||
protected string, | $lookupDelegateSql | ||
protected string, | $lookupCustomFieldSql | ||
protected array | $lookupCustomFieldCache | ||
protected array | $allowedDelegates |
Methods
No description
No description
No description
If the request attempts to change the entity_table/entity_id of an existing record, then generate an error.
No description
No description
No description
No description
No description
Details
at line 53
static array
getSubscribedEvents()
at line 130
__construct(Kernel $kernel, string $entityName, array $actions, string $lookupDelegateSql, string $lookupCustomFieldSql, array|NULL $allowedDelegates = NULL)
at line 145
onApiAuthorize(AuthorizeEvent $event)
at line 211
authorizeDelegate(string $action, string $entityTable, int|null $entityId, array $apiRequest)
at line 266
preventReassignment(int $fileId, string $entityTable, int $entityId, array $apiRequest)
If the request attempts to change the entity_table/entity_id of an existing record, then generate an error.