use upper-case constants for roles and rights in hasRight()
This commit is contained in:
parent
eaec5b03f5
commit
38833af6f1
|
@ -705,10 +705,12 @@ class User extends Memcached_DataObject
|
||||||
if (Event::handle('UserRightsCheck', array($this, $right, &$result))) {
|
if (Event::handle('UserRightsCheck', array($this, $right, &$result))) {
|
||||||
switch ($right)
|
switch ($right)
|
||||||
{
|
{
|
||||||
case Right::deleteOthersNotice:
|
case Right::DELETEOTHERSNOTICE:
|
||||||
$result = $this->hasRole('moderator');
|
$result = $this->hasRole(User_role::MODERATOR);
|
||||||
break;
|
break;
|
||||||
default:
|
case Right::CONFIGURESITE:
|
||||||
|
$result = $this->hasRole(User_role::ADMINISTRATOR);
|
||||||
|
default:
|
||||||
$result = false;
|
$result = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user