protected function CacheflushEntityAccessControlHandler::checkOwner in CacheFlush 8
Check entity owner.
Parameters
object $account: User account to check.
object $entity: The entity object.
Return value
\Drupal\Core\Access\AccessResult Access result.
1 call to CacheflushEntityAccessControlHandler::checkOwner()
- CacheflushEntityAccessControlHandler::checkSingleToMany in modules/
cacheflush_ui/ src/ CacheflushEntityAccessControlHandler.php - Check access for 'any' and 'own' permissions.
File
- modules/
cacheflush_ui/ src/ CacheflushEntityAccessControlHandler.php, line 78
Class
- CacheflushEntityAccessControlHandler
- Access controller for the Cacheflush entity.
Namespace
Drupal\cacheflush_uiCode
protected function checkOwner($account, $entity) {
if ($account
->id() == $entity
->getOwnerId()) {
return AccessResult::allowed();
}
return AccessResult::neutral();
}