mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Move permission and restriction initialization in AdmissionLoader
refs #10887
This commit is contained in:
parent
32c6a03000
commit
5b5978787b
@ -50,8 +50,6 @@ class AdmissionLoader
|
|||||||
*/
|
*/
|
||||||
public function applyRoles(User $user)
|
public function applyRoles(User $user)
|
||||||
{
|
{
|
||||||
$permissions = array();
|
|
||||||
$restrictions = array();
|
|
||||||
$username = $user->getUsername();
|
$username = $user->getUsername();
|
||||||
try {
|
try {
|
||||||
$roles = Config::app('roles');
|
$roles = Config::app('roles');
|
||||||
@ -64,6 +62,8 @@ class AdmissionLoader
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$userGroups = $user->getGroups();
|
$userGroups = $user->getGroups();
|
||||||
|
$permissions = array();
|
||||||
|
$restrictions = array();
|
||||||
$roleObjs = array();
|
$roleObjs = array();
|
||||||
foreach ($roles as $roleName => $role) {
|
foreach ($roles as $roleName => $role) {
|
||||||
if ($this->match($username, $userGroups, $role)) {
|
if ($this->match($username, $userGroups, $role)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user