protected function CacheflushEntityAccessControlHandler::checkSingleToMany in CacheFlush 8
Check access for 'any' and 'own' permissions.
Parameters
string $any: Permission string for any content.
string $single: Permission string for own content.
object $account: User account to check.
object $entity: The entity object.
Return value
bool Return TRUE if access is granted.
1 call to CacheflushEntityAccessControlHandler::checkSingleToMany()
- CacheflushEntityAccessControlHandler::checkAccess in modules/
cacheflush_ui/ src/ CacheflushEntityAccessControlHandler.php - Performs access checks.
File
- modules/
cacheflush_ui/ src/ CacheflushEntityAccessControlHandler.php, line 61
Class
- CacheflushEntityAccessControlHandler
- Access controller for the Cacheflush entity.
Namespace
Drupal\cacheflush_uiCode
protected function checkSingleToMany($any, $single, $account, $entity) {
return AccessResult::allowedIfHasPermission($account, $any)
->orIf(AccessResult::allowedIfHasPermission($account, $single)
->andIf($this
->checkOwner($account, $entity)));
}