Redirect to reports when moderator (#5733)

remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Yamagishi Kazutoshi 2017-11-17 11:26:34 +09:00 committed by Eugen Rochko
parent 9dd5e329ab
commit dc6e031364
1 changed files with 7 additions and 1 deletions

View File

@ -161,7 +161,13 @@ Rails.application.routes.draw do
resources :account_moderation_notes, only: [:create, :destroy] resources :account_moderation_notes, only: [:create, :destroy]
end end
authenticate :user, lambda { |u| u.admin? } do
get '/admin', to: redirect('/admin/settings/edit', status: 302) 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 namespace :api do
# PubSubHubbub outgoing subscriptions # PubSubHubbub outgoing subscriptions