Differential D16048 Diff 38616 src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/panel/DiffusionSetPasswordSettingsPanel.php
| <?php | <?php | ||||
| final class DiffusionSetPasswordSettingsPanel extends PhabricatorSettingsPanel { | final class DiffusionSetPasswordSettingsPanel 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 'vcspassword'; | return 'vcspassword'; | ||||
| } | } | ||||
| public function getPanelName() { | public function getPanelName() { | ||||
| return pht('VCS Password'); | return pht('VCS Password'); | ||||
| } | } | ||||
| public function getPanelGroupKey() { | public function getPanelGroupKey() { | ||||
| return PhabricatorSettingsAuthenticationPanelGroup::PANELGROUPKEY; | return PhabricatorSettingsAuthenticationPanelGroup::PANELGROUPKEY; | ||||
| } | } | ||||
| public function isEnabled() { | public function isEnabled() { | ||||
| if ($this->getUser()->getIsMailingList()) { | |||||
| return false; | |||||
| } | |||||
| return PhabricatorEnv::getEnvConfig('diffusion.allow-http-auth'); | return PhabricatorEnv::getEnvConfig('diffusion.allow-http-auth'); | ||||
| } | } | ||||
| public function processRequest(AphrontRequest $request) { | public function processRequest(AphrontRequest $request) { | ||||
| $viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
| $user = $this->getUser(); | $user = $this->getUser(); | ||||
| $token = id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession( | $token = id(new PhabricatorAuthSessionEngine())->requireHighSecuritySession( | ||||
| ▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines | |||||