]> cat aescling's git repositories - mastodon.git/commit
Add validations to admin settings (#10348)
authorEugen Rochko <eugen@zeonfederated.com>
Sat, 23 Mar 2019 13:07:04 +0000 (14:07 +0100)
committerGitHub <noreply@github.com>
Sat, 23 Mar 2019 13:07:04 +0000 (14:07 +0100)
commit555c4e11baf58401c1bdd915e4ecef679e6ae514
treedb7f30a6828f4df45c7dae6c387aef8e25b2eb5d
parent55a9658ad8552804c7c585df12d46c391b84dd94
Add validations to admin settings (#10348)

* Add validations to admin settings

- Validate correct HTML markup
- Validate presence of contact username & e-mail
- Validate that all usernames are valid
- Validate that enums have expected values

* Fix code style issue

* Fix tests
app/controllers/admin/settings_controller.rb
app/models/form/admin_settings.rb
app/validators/existing_username_validator.rb [new file with mode: 0644]
app/validators/html_validator.rb [new file with mode: 0644]
app/views/admin/settings/edit.html.haml
config/locales/en.yml
config/navigation.rb
spec/controllers/admin/settings_controller_spec.rb