mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Policy - add destructible interface
Summary: Fixes T6957. If / when a policy object is destroyed, access to an object that uses that policy object is denied. Test Plan: looked around in the code to fail confident enough to write the summary above Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T6957 Differential Revision: https://secure.phabricator.com/D11380
This commit is contained in:
parent
b1a5d5a815
commit
38d216f0f1
1 changed files with 14 additions and 1 deletions
|
@ -2,7 +2,9 @@
|
|||
|
||||
final class PhabricatorPolicy
|
||||
extends PhabricatorPolicyDAO
|
||||
implements PhabricatorPolicyInterface {
|
||||
implements
|
||||
PhabricatorPolicyInterface,
|
||||
PhabricatorDestructibleInterface {
|
||||
|
||||
const ACTION_ALLOW = 'allow';
|
||||
const ACTION_DENY = 'deny';
|
||||
|
@ -361,4 +363,15 @@ final class PhabricatorPolicy
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
/* -( PhabricatorDestructibleInterface )----------------------------------- */
|
||||
|
||||
|
||||
public function destroyObjectPermanently(
|
||||
PhabricatorDestructionEngine $engine) {
|
||||
|
||||
$this->delete();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue