public function AccessCheck::canAccessContentKanban in Content Planner 8
Check if user can access the Content Kanban.
Parameters
\Drupal\Core\Session\AccountInterface $account: The the current user.
Return value
\Drupal\Core\Access\AccessResultAllowed|\Drupal\Core\Access\AccessResultForbidden Returns the access result.
1 string reference to 'AccessCheck::canAccessContentKanban'
- content_kanban.routing.yml in modules/
content_kanban/ content_kanban.routing.yml - modules/content_kanban/content_kanban.routing.yml
File
- modules/
content_kanban/ src/ Access/ AccessCheck.php, line 25
Class
- AccessCheck
- Class AccessCheck.
Namespace
Drupal\content_kanban\AccessCode
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();
}