]> cat aescling's git repositories - mastodon.git/commit
Improve require_admin! and require_staff! filters (#7018)
authorEmelia Smith <ThisIsMissEm@users.noreply.github.com>
Tue, 3 Apr 2018 11:07:32 +0000 (13:07 +0200)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 3 Apr 2018 11:07:32 +0000 (13:07 +0200)
commit2e59751823585a8ef8729d4287239b326ab02193
tree0b942b9b0640e7378f5578c2a2705c0c5c136e9e
parent1c293086a16fce465d5bdc123809f2d28b3e2ab6
Improve require_admin! and require_staff! filters (#7018)

Previously these returns 302 redirects instead of 403s, which meant posting links to admin pages in slack caused them to unfurl, rather than stay as a link. Additionally, require_admin! doesn't appear to be actively used, on require_staff!
app/controllers/application_controller.rb
spec/controllers/admin/base_controller_spec.rb
spec/controllers/application_controller_spec.rb