Page MenuHomePhorge
Diviner Tech Docs ManiphestTaskAuthorPolicyRule

final class ManiphestTaskAuthorPolicyRule
Phorge Technical Documentation (Maniphest)

This class is not documented.

Tasks

Implementing Object Policies

Other Methods

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

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.

ManiphestTaskAuthorPolicyRule
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.

ManiphestTaskAuthorPolicyRule
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()
Inherited

This method is not documented.
Return
wild

public function getPolicyExplanation()

This method is not documented.
Return
wild