function WorkspaceSwitcherBlock::blockAccess
Same name in other branches
- 10 core/modules/workspaces/src/Plugin/Block/WorkspaceSwitcherBlock.php \Drupal\workspaces\Plugin\Block\WorkspaceSwitcherBlock::blockAccess()
Overrides BlockPluginTrait::blockAccess
File
-
core/
modules/ workspaces/ src/ Plugin/ Block/ WorkspaceSwitcherBlock.php, line 91
Class
- WorkspaceSwitcherBlock
- Provides a 'Workspace switcher' block.
Namespace
Drupal\workspaces\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) : AccessResultInterface {
return AccessResult::allowedIfHasPermissions($account, [
'view own workspace',
'view any workspace',
'administer workspaces',
], 'OR');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.