Differential D16048 Diff 38616 src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/settings/PhabricatorConduitTokensSettingsPanel.php
| <?php | <?php | ||||
| final class PhabricatorConduitTokensSettingsPanel | final class PhabricatorConduitTokensSettingsPanel | ||||
| extends PhabricatorSettingsPanel { | extends PhabricatorSettingsPanel { | ||||
| public function isEditableByAdministrators() { | public function isManagementPanel() { | ||||
| if ($this->getUser()->getIsMailingList()) { | |||||
| return false; | |||||
| } | |||||
| return true; | return true; | ||||
| } | } | ||||
| public function getPanelKey() { | public function getPanelKey() { | ||||
| return 'apitokens'; | return 'apitokens'; | ||||
| } | } | ||||
| public function getPanelName() { | public function getPanelName() { | ||||
| return pht('Conduit API Tokens'); | return pht('Conduit API Tokens'); | ||||
| } | } | ||||
| public function getPanelGroupKey() { | public function getPanelGroupKey() { | ||||
| return PhabricatorSettingsLogsPanelGroup::PANELGROUPKEY; | return PhabricatorSettingsLogsPanelGroup::PANELGROUPKEY; | ||||
| } | } | ||||
| public function isEnabled() { | public function isEnabled() { | ||||
| if ($this->getUser()->getIsMailingList()) { | |||||
| return false; | |||||
| } | |||||
| return true; | return true; | ||||
| } | } | ||||
| public function processRequest(AphrontRequest $request) { | public function processRequest(AphrontRequest $request) { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| $tokens = id(new PhabricatorConduitTokenQuery()) | $tokens = id(new PhabricatorConduitTokenQuery()) | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||