You are here

public function UserSwitchController::getUserSwitchPermissions in User Switch 8

Checks access for this controller.

1 string reference to 'UserSwitchController::getUserSwitchPermissions'
userswitch.routing.yml in ./userswitch.routing.yml
userswitch.routing.yml

File

src/Controller/UserSwitchController.php, line 136

Class

UserSwitchController
Provides route responses for the Example module.

Namespace

Drupal\userswitch\Controller

Code

public function getUserSwitchPermissions() {
  if ($this->userswitch
    ->isSwitchUser()) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}