Fixes T6947
Details
- Reviewers
epriestley - Maniphest Tasks
- T6947: Add configuration to lock auth/user creation, or to lock application policies
- Commits
- Restricted Diffusion Commit
rP8cfc37f8fcba: Config - add an option to lock policy settings
locked people.create.user and noted the UI only showed a link to the existing policy with no way to edit it.
tried to set the config to all the various bad things and saw helpful error messages telling me what I did wrong.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
It might be slightly safer to have a map<policy-name, forced-policy> but I'm not sure how easy that is to implement. But then if we decide to lock something later, we don't have to migrate existing installs: we can just add the lock and force it to the desired policy.
src/applications/meta/controller/PhabricatorApplicationEditController.php | ||
---|---|---|
118 | I think $locked_map will end up with array('admin' => true) here? We can just remove this line and rename one of the variables, I think? | |
src/applications/policy/config/PhabricatorPolicyConfigOptions.php | ||
49 | This option should probably be setLocked(true) itself, so you can't just unlock it and then unlock the policies. We can force it locked in config, but in the general case locking it seems like the right default. | |
src/applications/policy/config/PolicyLockOptionType.php | ||
7 | ees niceee |
Not sure why the robots didn't close this one. Daemon task queue looks clear from the web console at the moment.
There was a close transaction earlier (D11358#106423), maybe there's some rare race condition.