From 7ea4c793d6f6baaaaf9218ab43e545ce4e57da21 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 31 Aug 2018 12:24:01 +0200 Subject: Allow to show a specific status in the admin interface --- app/controllers/admin/statuses_controller.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'app/controllers') 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? -- cgit