mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 08:09:33 +08:00
Restrict access to the Email admin tab to Admins
This commit is contained in:
parent
ecd93f7efb
commit
3aaa9a8722
|
@ -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}}
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user