define rights for account maintenance and default rules

This commit is contained in:
Evan Prodromou 2010-12-13 16:28:32 -05:00
parent 7c7b91e61a
commit 75aaa98462
2 changed files with 16 additions and 0 deletions

View File

@ -891,6 +891,18 @@ class Profile extends Memcached_DataObject
case Right::EMAILONFAVE: case Right::EMAILONFAVE:
$result = !$this->isSandboxed(); $result = !$this->isSandboxed();
break; break;
case Right::BACKUPACCOUNT:
$result = common_config('profile', 'backup');
break;
case Right::RESTOREACCOUNT:
$result = common_config('profile', 'restore');
break;
case Right::DELETEACCOUNT:
$result = common_config('profile', 'delete');
break;
case Right::MOVEACCOUNT:
$result = common_config('profile', 'move');
break;
default: default:
$result = false; $result = false;
break; break;

View File

@ -61,5 +61,9 @@ class Right
const GRANTROLE = 'grantrole'; const GRANTROLE = 'grantrole';
const REVOKEROLE = 'revokerole'; const REVOKEROLE = 'revokerole';
const DELETEGROUP = 'deletegroup'; const DELETEGROUP = 'deletegroup';
const BACKUPACCOUNT = 'backupaccount';
const RESTOREACCOUNT = 'restoreaccount';
const DELETEACCOUNT = 'deleteaccount';
const MOVEACCOUNT = 'moveaccount';
} }