Move permission and restriction initialization in AdmissionLoader

refs #10887
This commit is contained in:
Eric Lippmann 2016-03-29 11:23:18 +02:00
parent 32c6a03000
commit 5b5978787b
1 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,6 @@ class AdmissionLoader
*/
public function applyRoles(User $user)
{
$permissions = array();
$restrictions = array();
$username = $user->getUsername();
try {
$roles = Config::app('roles');
@ -64,6 +62,8 @@ class AdmissionLoader
return;
}
$userGroups = $user->getGroups();
$permissions = array();
$restrictions = array();
$roleObjs = array();
foreach ($roles as $roleName => $role) {
if ($this->match($username, $userGroups, $role)) {