Fixed error when trying to create a new role.
This commit is contained in:
parent
432615508d
commit
2b34bde413
1 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@ $viewerPerms = $authInfo->getPerms('user');
|
||||||
if(!$viewerPerms->check(Perm::U_ROLES_MANAGE))
|
if(!$viewerPerms->check(Perm::U_ROLES_MANAGE))
|
||||||
Template::throwError(403);
|
Template::throwError(403);
|
||||||
|
|
||||||
|
$roleInfo = null;
|
||||||
$usersCtx = $msz->getUsersContext();
|
$usersCtx = $msz->getUsersContext();
|
||||||
$users = $usersCtx->getUsers();
|
$users = $usersCtx->getUsers();
|
||||||
$roles = $usersCtx->getRoles();
|
$roles = $usersCtx->getRoles();
|
||||||
|
@ -30,7 +31,7 @@ if(filter_has_var(INPUT_GET, 'r')) {
|
||||||
$currentUser = $authInfo->getUserInfo();
|
$currentUser = $authInfo->getUserInfo();
|
||||||
$canEditPerms = $viewerPerms->check(Perm::U_PERMS_MANAGE);
|
$canEditPerms = $viewerPerms->check(Perm::U_PERMS_MANAGE);
|
||||||
|
|
||||||
$permsInfos = $perms->getPermissionInfo(roleInfo: $roleInfo, categoryNames: Perm::INFO_FOR_ROLE);
|
$permsInfos = $roleInfo === null ? null : $perms->getPermissionInfo(roleInfo: $roleInfo, categoryNames: Perm::INFO_FOR_ROLE);
|
||||||
$permsLists = Perm::createList(Perm::LISTS_FOR_ROLE);
|
$permsLists = Perm::createList(Perm::LISTS_FOR_ROLE);
|
||||||
|
|
||||||
while($_SERVER['REQUEST_METHOD'] === 'POST' && CSRF::validateRequest()) {
|
while($_SERVER['REQUEST_METHOD'] === 'POST' && CSRF::validateRequest()) {
|
||||||
|
|
Loading…
Reference in a new issue