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)
|
public static function confirm($user, $privilege)
|
||||||
{
|
{
|
||||||
$minAccessRank = isset(self::$privileges[$privilege])
|
$minAccessRank = isset(self::$privileges[$privilege])
|
||||||
? AccessRank::Admin
|
? self::$privileges[$privilege]
|
||||||
: self::$privileges[$privilege];
|
: AccessRank::Admin;
|
||||||
return $user->access_rank >= $minAccessRank;
|
return intval($user->access_rank) >= $minAccessRank;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function confirmWithException($user, $privilege)
|
public static function confirmWithException($user, $privilege)
|
||||||
|
|
Loading…
Reference in a new issue