Merge branch 'kb_development' into kb_migration
This commit is contained in:
commit
c7fe057f92
40 changed files with 338 additions and 29 deletions
|
@ -62,7 +62,12 @@ class StatusesController < ApplicationController
|
|||
|
||||
def set_status
|
||||
@status = @account.statuses.find(params[:id])
|
||||
authorize @status, :show?
|
||||
|
||||
if request.authorization.present? && request.authorization.match(/^Bearer /i)
|
||||
raise Mastodon::NotPermittedError unless @status.capability_tokens.find_by(token: request.authorization.gsub(/^Bearer /i, ''))
|
||||
else
|
||||
authorize @status, :show?
|
||||
end
|
||||
rescue Mastodon::NotPermittedError
|
||||
not_found
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue