You are here

public function UserRole::mayEditSetting in Fasttoggle 8.2

Access control function.

Parameters

$user: The user against which to check (un)publish permission.

Return value

boolean Whether the user is allowed to (un)publish the user.

Overrides SettingTrait::mayEditSetting

File

src/Plugin/Setting/UserRole.php, line 111
Fasttoggle User Status

Class

UserRole
Abstract interface for settings. Plugin strings are used for quick filtering without the need to instantiate the class.

Namespace

Drupal\fasttoggle\Plugin\Setting

Code

public function mayEditSetting() {
  $user = \Drupal::currentUser();
  return AccessResult::allowedIfHasPermission($user, "override user blocked option");
}