Empty commit

This commit is contained in:
Git 2015-12-19 08:00:27 +00:00
parent aaee6d4a4b
commit 8eaadadc2a
2 changed files with 9 additions and 1 deletions

View File

@ -7,11 +7,16 @@ class Permissions {
* @param string $MinClass Return false if the user's class level is below this.
*/
public static function check_perms($PermissionName, $MinClass = 0) {
$OverrideClass = 1000;
$Override = G::$LoggedUser['EffectiveClass'] >= $OverrideClass;
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;
}

View File

@ -1,5 +1,8 @@
CHANGE LOG
2015-12-18 by newman
Add override option in check_perms() for overriding $MinClass
2015-12-16 by lawnmower
Fix adding donor points with decimals