class UpdateAccessCheck in FullCalendar 8.4
Same name and namespace in other branches
- 8.5 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck
- 8 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck
- 8.2 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck
- 8.3 src/Access/UpdateAccessCheck.php \Drupal\fullcalendar\Access\UpdateAccessCheck
@todo.
Hierarchy
- class \Drupal\fullcalendar\Access\UpdateAccessCheck implements AccessInterface
Expanded class hierarchy of UpdateAccessCheck
1 string reference to 'UpdateAccessCheck'
1 service uses UpdateAccessCheck
File
- src/
Access/ UpdateAccessCheck.php, line 13
Namespace
Drupal\fullcalendar\AccessView source
class UpdateAccessCheck implements AccessInterface {
/**
* {@inheritdoc}
*/
public function access(EntityInterface $entity, AccountInterface $account) {
return AccessResult::allowedIf($entity && $this
->check($entity, $account))
->cachePerUser();
}
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();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UpdateAccessCheck:: |
public | function | ||
UpdateAccessCheck:: |
public | function |