mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Add some more policy strings
Summary: Provides more helpful text, notabl on `bin/policy show`. Test Plan: Ran `bin/policy show`. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D7204
This commit is contained in:
parent
0d83e1d66f
commit
bf14d8ef2c
1 changed files with 19 additions and 0 deletions
|
@ -153,6 +153,25 @@ final class PhabricatorPolicy {
|
|||
return pht('Other: %s', $this->getName());
|
||||
}
|
||||
break;
|
||||
case PhabricatorPolicyCapability::CAN_EDIT:
|
||||
switch ($this->getPHID()) {
|
||||
case PhabricatorPolicies::POLICY_USER:
|
||||
return pht('Editable by all logged in users.');
|
||||
case PhabricatorPolicies::POLICY_ADMIN:
|
||||
return pht('Editable by all administrators.');
|
||||
case PhabricatorPolicies::POLICY_NOONE:
|
||||
return pht('Not editable by default.');
|
||||
}
|
||||
|
||||
switch ($this->getType()) {
|
||||
case PhabricatorPolicyType::TYPE_PROJECT:
|
||||
return pht(
|
||||
'Editable by members of the project "%s".',
|
||||
$this->getName());
|
||||
case PhabricatorPolicyType::TYPE_MASKED:
|
||||
return pht('Other: %s', $this->getName());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue