1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42: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:
Bob Trahan 2015-01-13 16:15:52 -08:00
parent b1a5d5a815
commit 38d216f0f1

View file

@ -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();
}
}