Updated applications, development admin settings to be staff only

• Updated:
- applications, development admin settings to be staff only
This commit is contained in:
mgabdev 2020-10-28 23:09:53 -05:00
parent c1b4a6f034
commit acc956777e
2 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ class Settings::ApplicationsController < Settings::BaseController
layout 'admin'
before_action :authenticate_user!
before_action :require_staff!
before_action :set_application, only: [:show, :update, :destroy, :regenerate]
before_action :prepare_scopes, only: [:create, :update]

View File

@ -27,7 +27,7 @@ SimpleNavigation::Configuration.run do |navigation|
s.item :export, safe_join([fa_icon('cloud-download fw'), t('settings.export')]), settings_export_url
end
n.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_url
n.item :development, safe_join([fa_icon('code fw'), t('settings.development')]), settings_applications_url, if: -> { current_user.staff? }
n.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), admin_reports_url, if: proc { current_user.staff? } do |s|
s.item :action_logs, safe_join([fa_icon('bars fw'), t('admin.action_logs.title')]), admin_action_logs_url