Commit dc6e0313 authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko

Redirect to reports when moderator (#5733)

parent 9dd5e329
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment