0
0
Fork 0

Extract authorization policy for viewing statuses (#3150)

This commit is contained in:
Jack Jennings 2017-05-29 09:22:22 -07:00 committed by Eugen Rochko
parent 9a81be0d37
commit 3a2003ba86
16 changed files with 155 additions and 80 deletions

View file

@ -1,12 +1,14 @@
# frozen_string_literal: true
class Api::Activitypub::NotesController < ApiController
include Authorization
before_action :set_status
respond_to :activitystreams2
def show
forbidden unless @status.permitted?
authorize @status, :show?
end
private