mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-20 03:31:10 +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:
parent
5a675cc7cc
commit
53d7868c6d
1 changed files with 4 additions and 3 deletions
|
@ -40,9 +40,10 @@ final class DrydockWorkingCopyBlueprintImplementation
|
|||
"Lease is missing required 'repositoryID' attribute.");
|
||||
}
|
||||
|
||||
// TODO: (T603) Figure out the interaction between policies and
|
||||
// Drydock.
|
||||
$repository = id(new PhabricatorRepository())->load($repository_id);
|
||||
$repository = id(new PhabricatorRepositoryQuery())
|
||||
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||||
->withIDs(array($repository_id))
|
||||
->executeOne();
|
||||
|
||||
if (!$repository) {
|
||||
throw new Exception(
|
||||
|
|
Loading…
Reference in a new issue