about summary refs log tree commit diff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-08-31 12:24:01 +0200
committerThibG <thib@sitedethib.com>2018-09-03 18:19:11 +0200
commit7ea4c793d6f6baaaaf9218ab43e545ce4e57da21 (patch)
treee02b2b71e5f6258f8b12e023817bff1c2e156861 /app/controllers/admin
parent6ad7dac79130bb7b68ccb703739167a737ed6b49 (diff)
Allow to show a specific status in the admin interface
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/statuses_controller.rb9
1 files changed, 9 insertions, 0 deletions
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?