public function CreateUser::CreateUserAccess in Subuser 8
1 call to CreateUser::CreateUserAccess()
- CreateUser::access in lib/
Drupal/ subuser/ Controller/ CreateUser.php
File
- lib/
Drupal/ subuser/ Controller/ CreateUser.php, line 20
Class
Namespace
Drupal\subuser\ControllerCode
public function CreateUserAccess($account) {
foreach (user_roles(TRUE) as $rid => $role) {
if ($account
->hasPermission('create subuser ' . $rid)) {
return AccessInterface::ALLOW;
}
}
return AccessInterface::DENY;
}