mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Removed unnecessary permissions code
$UserInfo['Level'] will never be higher than $UserInfo['EffectiveClass'], as that's the whole point of EffectiveClass. As such, it is pointless to run a comparison against both Level and EffectiveClass in check_perms, as $UserInfo['EffectiveClass'] >= $UserInfo['Level'], so if $UserInfo['Level'] >= $MinClass, $UserInfo['EffectiveClass'] >= $MinClass.
This commit is contained in:
parent
1653cade95
commit
54bc9a7553
@ -14,8 +14,7 @@ public static function check_perms($PermissionName, $MinClass = 0) {
|
||||
return (
|
||||
isset(G::$LoggedUser['Permissions'][$PermissionName])
|
||||
&& G::$LoggedUser['Permissions'][$PermissionName]
|
||||
&& (G::$LoggedUser['Class'] >= $MinClass
|
||||
|| G::$LoggedUser['EffectiveClass'] >= $MinClass
|
||||
&& (G::$LoggedUser['EffectiveClass'] >= $MinClass
|
||||
|| $Override)
|
||||
) ? true : false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user