1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-09 14:21:02 +01:00

Always include the current user as a selectable policy

Summary: Ref T4136. After Passphrase, user policies work correctly in this dropdown. Providing this option improves consistency and makes it easier to create, e.g., a private repository (where "no one" does not include the viewer, because they don't own the resulting object).

Test Plan: Set an object's policy to my user policy.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4136

Differential Revision: https://secure.phabricator.com/D7858
This commit is contained in:
epriestley 2013-12-30 16:48:36 -08:00
parent 4b7f3b709d
commit db89883447

View file

@ -190,6 +190,11 @@ final class PhabricatorPolicyQuery
foreach ($projects as $project) {
$phids[] = $project->getPHID();
}
// Include the "current viewer" policy. This improves consistency, but
// is also useful for creating private instances of normally-shared object
// types, like repositories.
$phids[] = $viewer->getPHID();
}
$capabilities = $this->object->getCapabilities();