more rights denied to silenced and sandboxed

This commit is contained in:
Evan Prodromou 2009-11-16 19:46:08 +01:00
parent f1efb845e4
commit e9321a1806
2 changed files with 8 additions and 0 deletions

View File

@ -690,9 +690,13 @@ class Profile extends Memcached_DataObject
$result = $this->hasRole(Profile_role::ADMINISTRATOR);
break;
case Right::NEWNOTICE:
case Right::NEWMESSAGE:
case Right::SUBSCRIBE:
$result = !$this->isSilenced();
break;
case Right::PUBLICNOTICE:
case Right::EMAILONREPLY:
case Right::EMAILONSUBSCRIBE:
$result = !$this->isSandboxed();
break;
default:

View File

@ -52,5 +52,9 @@ class Right
const SANDBOXUSER = 'sandboxuser';
const NEWNOTICE = 'newnotice';
const PUBLICNOTICE = 'publicnotice';
const NEWMESSAGE = 'newmessage';
const SUBSCRIBE = 'subscribe';
const EMAILONREPLY = 'emailonreply';
const EMAILONSUBSCRIBE = 'emailonsubscribe';
}