Page MenuHomeClusterLabs Projects
Diviner Tech Docs PhabricatorPolicyFilter

final class PhabricatorPolicyFilter
Phorge Technical Documentation (Policy)

This class is not documented.

Methods

public static function mustRetainCapability($user, $object, $capability)

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

public static function requireCapability($user, $object, $capability)

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

public static function requireCapabilityWithForcedPolicy($viewer, $object, $capability, $forced_policy)

Perform a capability check, acting as though an object had a specific policy. This is primarily used to check if a policy is valid (for example, to prevent users from editing away their ability to edit an object).

Specifically, a check like this:

PhabricatorPolicyFilter::requireCapabilityWithForcedPolicy(
  $viewer,
  $object,
  PhabricatorPolicyCapability::CAN_EDIT,
  $potential_new_policy);

...will throw a PhabricatorPolicyException if the new policy would remove the user's ability to edit the object.

Parameters
PhabricatorUser$viewerThe viewer to perform a policy check for.
PhabricatorPolicyInterface$objectThe object to perform a policy check on.
string$capabilityCapability to test.
string$forced_policyPerform the test as though the object has this policy instead of the policy it actually has.
Return
void

public static function hasCapability($user, $object, $capability)

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

public static function canInteract($user, $object)

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

public static function requireCanInteract($user, $object)

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

private static function getRequiredInteractCapabilities($object)

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

public function setViewer($user)

This method is not documented.
Parameters
PhabricatorUser$user
Return
wild

public function requireCapabilities($capabilities)

This method is not documented.
Parameters
array$capabilities
Return
wild

public function raisePolicyExceptions($raise)

This method is not documented.
Parameters
$raise
Return
wild

public function forcePolicy($forced_policy)

This method is not documented.
Parameters
$forced_policy
Return
wild

public function apply($objects)

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

private function applyExtendedPolicyChecks($extended_objects)

This method is not documented.
Parameters
array$extended_objects
Return
wild

private function executeExtendedPolicyChecks($viewer, $capabilities, $objects, $key_map)

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

private function checkCapability($object, $capability)

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

public function rejectObject($object, $policy, $capability)

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

private function loadObjectPolicies($map)

This method is not documented.
Parameters
array$map
Return
wild

private function loadCustomPolicies($map)

This method is not documented.
Parameters
array$map
Return
wild

private function checkObjectPolicy($policy_phid, $object)

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

private function checkCustomPolicy($policy_phid, $object)

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

private function getObjectPolicy($object, $capability)

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

private function renderAccessDenied($object)

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

private function canViewerSeeObjectsInSpace($viewer, $space_phid)

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

private function rejectObjectFromSpace($object, $space_phid)

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

private function applyApplicationChecks($objects)

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

private function getApplicationForPHID($phid)

This method is not documented.
Parameters
$phid
Return
wild