diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-11-17 11:26:34 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-11-17 03:26:34 +0100 |
commit | dc6e031364d1f47a49ea47f20070a4e9986a4c68 (patch) | |
tree | 66c7f4994914e880b294893811f9d2340b221024 | |
parent | 9dd5e329ab5edab705c5622bc97f93bd5c50976b (diff) |
Redirect to reports when moderator (#5733)
-rw-r--r-- | config/routes.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index 9301a4e50..4a98b0b95 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -161,7 +161,13 @@ Rails.application.routes.draw do resources :account_moderation_notes, only: [:create, :destroy] end - get '/admin', to: redirect('/admin/settings/edit', status: 302) + authenticate :user, lambda { |u| u.admin? } do + get '/admin', to: redirect('/admin/settings/edit', status: 302) + end + + authenticate :user, lambda { |u| u.moderator? } do + get '/admin', to: redirect('/admin/reports', status: 302) + end namespace :api do # PubSubHubbub outgoing subscriptions |