Change follow scope to be covered by read and write scopes in REST API (#17678)

Deprecate `follow` scope
This commit is contained in:
Eugen Rochko
2022-03-03 16:13:40 +01:00
committed by GitHub
parent 085f286750
commit 631e495a79
5 changed files with 9 additions and 9 deletions

View File

@ -1,8 +1,8 @@
# frozen_string_literal: true
class Api::V1::FollowRequestsController < Api::BaseController
before_action -> { doorkeeper_authorize! :follow, :'read:follows' }, only: :index
before_action -> { doorkeeper_authorize! :follow, :'write:follows' }, except: :index
before_action -> { doorkeeper_authorize! :follow, :read, :'read:follows' }, only: :index
before_action -> { doorkeeper_authorize! :follow, :write, :'write:follows' }, except: :index
before_action :require_user!
after_action :insert_pagination_headers, only: :index