Improve messaging of special policy rules in applications
Summary: Ref T603. When the user encounters an action which is controlled by a special policy rule in the application, make it easier for applications to show the user what policy controls the action and what the setting is. I took this about halfway before and left a TODO, but turn it into something more useful. Test Plan: See screenshots. Reviewers: btrahan, chad Reviewed By: chad CC: chad, aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7265
This commit is contained in:
@@ -63,8 +63,14 @@ final class PhabricatorPolicyExplainController
|
||||
$auto_info = phutil_tag('ul', array(), $auto_info);
|
||||
}
|
||||
|
||||
$capability_name = $capability;
|
||||
$capobj = PhabricatorPolicyCapability::getCapabilityByKey($capability);
|
||||
if ($capobj) {
|
||||
$capability_name = $capobj->getCapabilityName();
|
||||
}
|
||||
|
||||
$content = array(
|
||||
pht('Users with the "%s" capability:', "Can View"),
|
||||
pht('Users with the "%s" capability:', $capability_name),
|
||||
$auto_info,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user