diff options
author | Evan Prodromou <evan@status.net> | 2009-11-07 19:16:54 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-07 19:16:54 -0500 |
commit | 38833af6f18ae48caed0cc7939803c89e3104ef9 (patch) | |
tree | fb426d586430b572f2c041f76e79499fecc8172e /classes | |
parent | eaec5b03f59b0ac5bcde4a973d72946a52cbd2a6 (diff) |
use upper-case constants for roles and rights in hasRight()
Diffstat (limited to 'classes')
-rw-r--r-- | classes/User.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/User.php b/classes/User.php index 96a64ccb2..546406f71 100644 --- a/classes/User.php +++ b/classes/User.php @@ -705,10 +705,12 @@ class User extends Memcached_DataObject if (Event::handle('UserRightsCheck', array($this, $right, &$result))) { switch ($right) { - case Right::deleteOthersNotice: - $result = $this->hasRole('moderator'); + case Right::DELETEOTHERSNOTICE: + $result = $this->hasRole(User_role::MODERATOR); break; - default: + case Right::CONFIGURESITE: + $result = $this->hasRole(User_role::ADMINISTRATOR); + default: $result = false; break; } |