diff options
author | Evan Prodromou <evan@status.net> | 2009-11-15 15:59:10 +0100 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-15 15:59:10 +0100 |
commit | c9475c76a8b4c2bf32d1d3293b03b646e7e7a91e (patch) | |
tree | d5e5bc7e9859824b25788d947eddff1531cb329b /classes/User.php | |
parent | e3b53565bb5744116811cd88dbe67ae8df7547fd (diff) |
define rights around how to silence, sandbox, and delete a user
Diffstat (limited to 'classes/User.php')
-rw-r--r-- | classes/User.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php index 9f1ee53f4..0e8404377 100644 --- a/classes/User.php +++ b/classes/User.php @@ -720,10 +720,14 @@ class User extends Memcached_DataObject switch ($right) { case Right::DELETEOTHERSNOTICE: + case Right::SANDBOXUSER: + case Right::SILENCEUSER: + case Right::DELETEUSER: $result = $this->hasRole(User_role::MODERATOR); break; case Right::CONFIGURESITE: $result = $this->hasRole(User_role::ADMINISTRATOR); + break; default: $result = false; break; @@ -774,4 +778,14 @@ class User extends Memcached_DataObject $block->delete(); // XXX delete group block? Reset blocker? } + + function isSandboxed() + { + return $this->hasRole(User_role::SANDBOXED); + } + + function isSilenced() + { + return $this->hasRole(User_role::SILENCED); + } } |