Page MenuHomeClusterLabs Projects
Diviner Tech Docs PhameInheritBlogPolicyRule

final class PhameInheritBlogPolicyRule
Phorge Technical Documentation (Phame)

This class is not documented.

Tasks

Implementing Object Policies

Other Methods

Methods

public function getRuleDescription()

This method is not documented.
Return
wild

public function willApplyRules($viewer, $values, $objects)
Inherited

This method is not documented.
Parameters
PhabricatorUser$viewer
array$values
array$objects
Return
wild

public function applyRule($viewer, $value, $object)

This method is not documented.
Parameters
PhabricatorUser$viewer
$value
PhabricatorPolicyInterface$object
Return
wild

public function getValueControlType()

This method is not documented.
Return
wild

public function getValueControlTemplate()
Inherited

This method is not documented.
Return
wild

public function canApplyToObject($object)

PhabricatorPolicyRule

Return true if this rule can be applied to the given object.

Some policy rules may only operation on certain kinds of objects. For example, a "task author" rule can only operate on tasks.

PhameInheritBlogPolicyRule
This method is not documented.
Parameters
PhabricatorPolicyInterface$object
Return
wild

protected function getDatasourceTemplate($datasource)
Inherited

This method is not documented.
Parameters
PhabricatorTypeaheadDatasource$datasource
Return
wild

public function getRuleOrder()
Inherited

This method is not documented.
Return
wild

public function getValueForStorage($value)
Inherited

This method is not documented.
Parameters
$value
Return
wild

public function getValueForDisplay($viewer, $value)
Inherited

This method is not documented.
Parameters
PhabricatorUser$viewer
$value
Return
wild

public function getRequiredHandlePHIDsForSummary($value)
Inherited

This method is not documented.
Parameters
$value
Return
wild

public function ruleHasEffect($value)
Inherited

PhabricatorPolicyRule

Return true if the given value creates a rule with a meaningful effect. An example of a rule with no meaningful effect is a "users" rule with no users specified.

Parameters
$value
Return
boolTrue if the value creates a meaningful rule.

public static function passTransactionHintToRule($object, $rule, $hint)
Inherited

PhabricatorPolicyRule

Tell policy rules about upcoming transaction effects.

Before transaction effects are applied, we try to stop users from making edits which will lock them out of objects. We can't do this perfectly, since they can set a policy to "the moon is full" moments before it wanes, but we try to prevent as many mistakes as possible.

Some policy rules depend on complex checks against object state which we can't set up ahead of time. For example, subscriptions require database writes.

In cases like this, instead of doing writes, you can pass a hint about an object to a policy rule. The rule can then look for hints and use them in rendering a verdict about whether the user will be able to see the object or not after applying the policy change.

Parameters
PhabricatorPolicyInterface$objectObject to pass a hint about.
PhabricatorPolicyRule$ruleRule to pass hint to.
wild$hintHint.
Return
void

final protected function getTransactionHint($object)
Inherited

This method is not documented.
Parameters
PhabricatorPolicyInterface$object
Return
wild

private static function getObjectPolicyCacheKey($object, $rule)
Inherited

This method is not documented.
Parameters
PhabricatorPolicyInterface$object
PhabricatorPolicyRule$rule
Return
wild

public function getObjectPolicyKey()

PhabricatorPolicyRule

Return a unique string like "maniphest.author" to expose this rule as an object policy.

Object policy rules, like "Task Author", are more advanced than basic policy rules (like "All Users") but not as powerful as custom rules.

PhameInheritBlogPolicyRule
This method is not documented.
Return
stringUnique identifier for this rule.

final public function getObjectPolicyFullKey()
Inherited

This method is not documented.
Return
wild

public function getObjectPolicyName()

This method is not documented.
Return
wild

public function getObjectPolicyShortName()
Inherited

This method is not documented.
Return
wild

public function getObjectPolicyIcon()

This method is not documented.
Return
wild

public function getPolicyExplanation()

This method is not documented.
Return
wild