1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02: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:
epriestley 2013-10-03 12:39:51 -07:00
parent 0d83e1d66f
commit bf14d8ef2c

View file

@ -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;
}