+ public function isPrivileged()
+ {
+ // TODO: An Event::handle so plugins can report if users are privileged.
+ // The ModHelper is the only one I care about when coding this, and that
+ // can be tested with Right::SILENCEUSER which I do below:
+ switch (true) {
+ case $this->hasRight(Right::SILENCEUSER):
+ case $this->hasRole(Profile_role::MODERATOR):
+ case $this->hasRole(Profile_role::ADMINISTRATOR):
+ case $this->hasRole(Profile_role::OWNER):
+ return true;
+ }
+
+ return false;
+ }
+