1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-20 11:41:08 +01:00

Policy - convert Drydock query for repository to policy-based query

Summary: Ref T7094. Switch to OmnipotentUser policy-based query since this is usually done offline, etc.

Test Plan: pretty simple code change so I just have my fingers crossed while I am typing this

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7094

Differential Revision: https://secure.phabricator.com/D11655
This commit is contained in:
Bob Trahan 2015-02-03 12:28:11 -08:00
parent 5a675cc7cc
commit 53d7868c6d

View file

@ -40,9 +40,10 @@ final class DrydockWorkingCopyBlueprintImplementation
"Lease is missing required 'repositoryID' attribute."); "Lease is missing required 'repositoryID' attribute.");
} }
// TODO: (T603) Figure out the interaction between policies and $repository = id(new PhabricatorRepositoryQuery())
// Drydock. ->setViewer(PhabricatorUser::getOmnipotentUser())
$repository = id(new PhabricatorRepository())->load($repository_id); ->withIDs(array($repository_id))
->executeOne();
if (!$repository) { if (!$repository) {
throw new Exception( throw new Exception(