Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/editor/PhabricatorAuthProviderConfigEditor.php
| Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| case PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN: | case PhabricatorAuthProviderConfigTransaction::TYPE_AUTO_LOGIN: | ||||
| // For these types, last transaction wins. | // For these types, last transaction wins. | ||||
| return $v; | return $v; | ||||
| } | } | ||||
| return parent::mergeTransactions($u, $v); | return parent::mergeTransactions($u, $v); | ||||
| } | } | ||||
| protected function validateAllTransactions( | |||||
| PhabricatorLiskDAO $object, | |||||
| array $xactions) { | |||||
| $errors = parent::validateAllTransactions($object, $xactions); | |||||
| $locked_config_key = 'auth.lock-config'; | |||||
| $is_locked = PhabricatorEnv::getEnvConfig($locked_config_key); | |||||
| if ($is_locked) { | |||||
| $errors[] = new PhabricatorApplicationTransactionValidationError( | |||||
| null, | |||||
| pht('Config Locked'), | |||||
| pht('Authentication provider configuration is locked, and can not be '. | |||||
| 'changed without being unlocked.'), | |||||
| null); | |||||
| } | |||||
| return $errors; | |||||
| } | |||||
| } | } | ||||