Fixed privileges in user view
This commit is contained in:
parent
e610963d4b
commit
42b8049ae5
1 changed files with 10 additions and 2 deletions
|
@ -33,9 +33,17 @@ class UserController
|
||||||
$query = 'fav:' . $user->getName();
|
$query = 'fav:' . $user->getName();
|
||||||
|
|
||||||
elseif ($tab == 'delete')
|
elseif ($tab == 'delete')
|
||||||
Access::assert(new Privilege(Privilege::DeleteUser));
|
{
|
||||||
|
Access::assert(new Privilege(
|
||||||
|
Privilege::DeleteUser,
|
||||||
|
Access::getIdentity($user)));
|
||||||
|
}
|
||||||
elseif ($tab == 'settings')
|
elseif ($tab == 'settings')
|
||||||
Access::assert(new Privilege(Privilege::ChangeUserSettings));
|
{
|
||||||
|
Access::assert(new Privilege(
|
||||||
|
Privilege::ChangeUserSettings,
|
||||||
|
Access::getIdentity($user)));
|
||||||
|
}
|
||||||
elseif ($tab == 'edit' and !(new EditUserJob)->canEditAnything(Auth::getCurrentUser()))
|
elseif ($tab == 'edit' and !(new EditUserJob)->canEditAnything(Auth::getCurrentUser()))
|
||||||
Access::fail();
|
Access::fail();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue