Extract authorization policy for viewing statuses (#3150)
This commit is contained in:
parent
9a81be0d37
commit
3a2003ba86
16 changed files with 155 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue