Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Lines | if (!$control_packages) { | ||||
return null; | return null; | ||||
} | } | ||||
// Load all the packages which have potential control over some of the | // Load all the packages which have potential control over some of the | ||||
// paths in the change and are owned by the actor. These are packages | // paths in the change and are owned by the actor. These are packages | ||||
// which the actor may be able to use their authority over to gain the | // which the actor may be able to use their authority over to gain the | ||||
// ability to force-accept for other packages. This query doesn't apply | // ability to force-accept for other packages. This query doesn't apply | ||||
// dominion rules yet, and we'll bypass those rules later on. | // dominion rules yet, and we'll bypass those rules later on. | ||||
// See T13657. We ignore "watcher" packages which don't grant their owners | |||||
// permission to force accept anything. | |||||
$authority_query = id(new PhabricatorOwnersPackageQuery()) | $authority_query = id(new PhabricatorOwnersPackageQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) | ->withStatuses(array(PhabricatorOwnersPackage::STATUS_ACTIVE)) | ||||
->withAuthorityModes( | |||||
array( | |||||
PhabricatorOwnersPackage::AUTHORITY_STRONG, | |||||
)) | |||||
->withAuthorityPHIDs(array($viewer->getPHID())) | ->withAuthorityPHIDs(array($viewer->getPHID())) | ||||
->withControl($repository_phid, $paths); | ->withControl($repository_phid, $paths); | ||||
$authority_packages = $authority_query->execute(); | $authority_packages = $authority_query->execute(); | ||||
if (!$authority_packages) { | if (!$authority_packages) { | ||||
return null; | return null; | ||||
} | } | ||||
$authority_packages = mpull($authority_packages, null, 'getPHID'); | $authority_packages = mpull($authority_packages, null, 'getPHID'); | ||||
▲ Show 20 Lines • Show All 835 Lines • Show Last 20 Lines |