You are here

public function BlockPermissionsAccessControlHandler::blockThemeListAccess in Block permissions 8

Access check for the block list for specific themes.

Parameters

string $theme: The theme name.

Return value

\Drupal\Core\Access\AccessResultInterface An access result.

File

src/BlockPermissionsAccessControlHandler.php, line 91

Class

BlockPermissionsAccessControlHandler
Controller for the block permissions.

Namespace

Drupal\block_permissions

Code

public function blockThemeListAccess($theme) {

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