@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+14 -1
+14 -1
src/applications/policy/storage/PhabricatorPolicy.php
··· 2 2 3 3 final class PhabricatorPolicy 4 4 extends PhabricatorPolicyDAO 5 - implements PhabricatorPolicyInterface { 5 + implements 6 + PhabricatorPolicyInterface, 7 + PhabricatorDestructibleInterface { 6 8 7 9 const ACTION_ALLOW = 'allow'; 8 10 const ACTION_DENY = 'deny'; ··· 360 362 public function describeAutomaticCapability($capability) { 361 363 return null; 362 364 } 365 + 366 + 367 + /* -( PhabricatorDestructibleInterface )----------------------------------- */ 368 + 369 + 370 + public function destroyObjectPermanently( 371 + PhabricatorDestructionEngine $engine) { 372 + 373 + $this->delete(); 374 + } 375 + 363 376 364 377 }