You are here

public function BlockPermissionsAccessControlHandler::blockListAccess in Block permissions 8

Access check for the default block list manage page.

Return value

\Drupal\Core\Access\AccessResult AccessResult object.

File

src/BlockPermissionsAccessControlHandler.php, line 73

Class

BlockPermissionsAccessControlHandler
Controller for the block permissions.

Namespace

Drupal\block_permissions

Code

public function blockListAccess() {
  $theme = $this->configFactory
    ->get('system.theme')
    ->get('default');

  // Check if the user has the proper permissions.
  $access = AccessResult::allowedIfHasPermission($this->currentUser, 'administer block settings for theme ' . $theme);
  return $access;
}