public function UpdateAccessCheck::check in FullCalendar 8
Same name and namespace in other branches
- 8.5 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck::check()
- 8.2 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck::check()
- 8.3 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck::check()
- 8.4 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck::check()
File
- src/
Access/ UpdateAccessCheck.php, line 23
Class
- UpdateAccessCheck
- @todo.
Namespace
Drupal\fullcalendar\AccessCode
public function check(EntityInterface $entity, AccountInterface $account) {
return $account
->hasPermission('administer content') || $account
->hasPermission('update any fullcalendar event') || $account
->hasPermission('edit any ' . $entity
->bundle() . ' content') || $account
->hasPermission('edit own ' . $entity
->bundle() . ' content') && $entity->uid == $account
->id();
}