Extract authorization policy for viewing statuses (#3150)
This commit is contained in:
committed by
Eugen Rochko
parent
9a81be0d37
commit
3a2003ba86
@ -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
|
||||
|
Reference in New Issue
Block a user