class AccessCheck in Content Planner 8
Class AccessCheck.
@package Drupal\my_module\Access
Hierarchy
- class \Drupal\content_kanban\Access\AccessCheck implements AccessInterface
Expanded class hierarchy of AccessCheck
File
- modules/
content_kanban/ src/ Access/ AccessCheck.php, line 14
Namespace
Drupal\content_kanban\AccessView source
class AccessCheck implements AccessInterface {
/**
* Check if user can access the Content Kanban.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The the current user.
*
* @return \Drupal\Core\Access\AccessResultAllowed|\Drupal\Core\Access\AccessResultForbidden
* Returns the access result.
*/
public function canAccessContentKanban(AccountInterface $account) {
if ($account
->hasPermission('manage own content with content kanban') || $account
->hasPermission('manage any content with content kanban')) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AccessCheck:: |
public | function | Check if user can access the Content Kanban. |