about summary refs log tree commit diff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-07-16 01:11:53 +0200
committerGitHub <noreply@github.com>2018-07-16 01:11:53 +0200
commit2354b10eb5e9c7382726bc5e6e041ea30a903c90 (patch)
tree1ef4970358a516c3a7a196dfe5fd84ef81b812a7 /config/routes.rb
parent7a686082370ad6d1c7a7d0ad331c22bf3e1fbede (diff)
Add admin dashboard (#8029)
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 3d0da1a85..1c97f5a82 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -124,6 +124,8 @@ Rails.application.routes.draw do
   resource :share, only: [:show, :create]
 
   namespace :admin do
+    get '/dashboard', to: 'dashboard#index'
+
     resources :subscriptions, only: [:index]
     resources :domain_blocks, only: [:index, :new, :create, :show, :destroy]
     resources :email_domain_blocks, only: [:index, :new, :create, :destroy]
@@ -196,13 +198,7 @@ Rails.application.routes.draw do
     resources :account_moderation_notes, only: [:create, :destroy]
   end
 
-  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
+  get '/admin', to: redirect('/admin/dashboard', status: 302)
 
   namespace :api do
     # PubSubHubbub outgoing subscriptions