Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialReviewer.php
| Show All 33 Lines | protected function getConfiguration() { | ||||
| ) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
| } | } | ||||
| public function isUser() { | public function isUser() { | ||||
| $user_type = PhabricatorPeopleUserPHIDType::TYPECONST; | $user_type = PhabricatorPeopleUserPHIDType::TYPECONST; | ||||
| return (phid_get_type($this->getReviewerPHID()) == $user_type); | return (phid_get_type($this->getReviewerPHID()) == $user_type); | ||||
| } | } | ||||
| public function isPackage() { | |||||
| $package_type = PhabricatorOwnersPackagePHIDType::TYPECONST; | |||||
| return (phid_get_type($this->getReviewerPHID()) == $package_type); | |||||
| } | |||||
| public function attachAuthority(PhabricatorUser $user, $has_authority) { | public function attachAuthority(PhabricatorUser $user, $has_authority) { | ||||
| $this->authority[$user->getCacheFragment()] = $has_authority; | $this->authority[$user->getCacheFragment()] = $has_authority; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function hasAuthority(PhabricatorUser $viewer) { | public function hasAuthority(PhabricatorUser $viewer) { | ||||
| $cache_fragment = $viewer->getCacheFragment(); | $cache_fragment = $viewer->getCacheFragment(); | ||||
| return $this->assertAttachedKey($this->authority, $cache_fragment); | return $this->assertAttachedKey($this->authority, $cache_fragment); | ||||
| ▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines | |||||