Restrict access to the Email admin tab to Admins

This commit is contained in:
Robin Ward 2015-09-29 12:37:46 -04:00
parent ecd93f7efb
commit 3aaa9a8722
2 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@
{{/if}} {{/if}}
{{#if currentUser.admin}} {{#if currentUser.admin}}
{{nav-item route='adminGroups' label='admin.groups.title'}} {{nav-item route='adminGroups' label='admin.groups.title'}}
{{nav-item route='adminEmail' label='admin.email.title'}}
{{/if}} {{/if}}
{{nav-item route='adminEmail' label='admin.email.title'}}
{{nav-item route='adminFlags' label='admin.flags.title'}} {{nav-item route='adminFlags' label='admin.flags.title'}}
{{nav-item route='adminLogs' label='admin.logs.title'}} {{nav-item route='adminLogs' label='admin.logs.title'}}
{{#if currentUser.admin}} {{#if currentUser.admin}}

View File

@ -113,7 +113,7 @@ Discourse::Application.routes.draw do
resources :impersonate, constraints: AdminConstraint.new resources :impersonate, constraints: AdminConstraint.new
resources :email do resources :email, constraints: AdminConstraint.new do
collection do collection do
post "test" post "test"
get "all" get "all"