diff options
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/base_controller.rb | 7 | ||||
-rw-r--r-- | app/controllers/admin/settings_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/admin/statuses_controller.rb | 9 |
3 files changed, 17 insertions, 2 deletions
diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb index 7fb69d578..fc299f74c 100644 --- a/app/controllers/admin/base_controller.rb +++ b/app/controllers/admin/base_controller.rb @@ -5,8 +5,13 @@ module Admin include Authorization include AccountableConcern + layout 'admin' + before_action :require_staff! + before_action :set_pack - layout 'admin' + def set_pack + use_pack 'admin' + end end end diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index d9f261489..46e9b2c07 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -16,7 +16,8 @@ module Admin timeline_preview show_staff_badge bootstrap_timeline_accounts - theme + flavour + skin thumbnail hero mascot diff --git a/app/controllers/admin/statuses_controller.rb b/app/controllers/admin/statuses_controller.rb index a69f12084..62f49806c 100644 --- a/app/controllers/admin/statuses_controller.rb +++ b/app/controllers/admin/statuses_controller.rb @@ -22,6 +22,15 @@ module Admin @form = Form::StatusBatch.new end + def show + authorize :status, :index? + + @statuses = @account.statuses.where(id: params[:id]) + authorize @statuses[0], :show? + + @form = Form::StatusBatch.new + end + def create authorize :status, :update? |