Fixed bug in privilege checking
This commit is contained in:
parent
2ddc203fb8
commit
2cd7541042
1 changed files with 3 additions and 3 deletions
|
@ -17,9 +17,9 @@ class PrivilegesHelper
|
|||
public static function confirm($user, $privilege)
|
||||
{
|
||||
$minAccessRank = isset(self::$privileges[$privilege])
|
||||
? AccessRank::Admin
|
||||
: self::$privileges[$privilege];
|
||||
return $user->access_rank >= $minAccessRank;
|
||||
? self::$privileges[$privilege]
|
||||
: AccessRank::Admin;
|
||||
return intval($user->access_rank) >= $minAccessRank;
|
||||
}
|
||||
|
||||
public static function confirmWithException($user, $privilege)
|
||||
|
|
Loading…
Reference in a new issue