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:
MrPMan 2016-01-03 23:59:02 -08:00
parent 1653cade95
commit 54bc9a7553

View File

@ -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;
}