Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F1068048
PhabricatorPolicyInterface.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
PhabricatorPolicyInterface.php
View Options
<?php
interface
PhabricatorPolicyInterface
{
public
function
getCapabilities
();
public
function
getPolicy
(
$capability
);
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
);
/**
* Describe exceptions to an object's policy setting.
*
* The intent of this method is to explain and inform users about special
* cases which override configured policy settings. If this object has any
* such exceptions, explain them by returning one or more human-readable
* strings which describe the exception in a broad, categorical way. For
* example:
*
* - "The owner of an X can always view and edit it."
* - "Members of a Y can always view it."
*
* You can return `null`, a single string, or a list of strings.
*
* The relevant capability to explain (like "view") is passed as a parameter.
* You should tailor any messages to be relevant to that capability, although
* they do not need to exclusively describe the capability, and in some cases
* being more general ("The author can view and edit...") will be more clear.
*
* Messages should describe general rules, not specific objects, because the
* main goal is to teach the user the rules. For example, write "the author",
* not the specific author's name.
*
* @param const @{class:PhabricatorPolicyCapability} constant.
* @return wild Description of policy exceptions. See above.
*/
public
function
describeAutomaticCapability
(
$capability
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jun 29, 1:41 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
261157
Default Alt Text
PhabricatorPolicyInterface.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment