about summary refs log tree commit diff
path: root/app/controllers/api
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-08-10 15:22:04 +0200
committerThibaut Girka <thib@sitedethib.com>2018-08-10 15:26:52 +0200
commit90b492143dae5cbaf884b12fbfd823c9f65d392f (patch)
tree58ecbe9865b1cfcca6b08da53e8bb6c5e01e5c9a /app/controllers/api
parent7d1dd59496189d7b6e81585a01aaaae6fd45a737 (diff)
Introduce OAuth scopes for bookmarks
Diffstat (limited to 'app/controllers/api')
-rw-r--r--app/controllers/api/v1/bookmarks_controller.rb2
-rw-r--r--app/controllers/api/v1/statuses/bookmarks_controller.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/v1/bookmarks_controller.rb b/app/controllers/api/v1/bookmarks_controller.rb
index 49038807d..1cab3c372 100644
--- a/app/controllers/api/v1/bookmarks_controller.rb
+++ b/app/controllers/api/v1/bookmarks_controller.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class Api::V1::BookmarksController < Api::BaseController
-  before_action -> { doorkeeper_authorize! :read }
+  before_action -> { doorkeeper_authorize! :read, :'read:bookmarks' }
   before_action :require_user!
   after_action :insert_pagination_headers
 
diff --git a/app/controllers/api/v1/statuses/bookmarks_controller.rb b/app/controllers/api/v1/statuses/bookmarks_controller.rb
index d7def5f1f..bb9729cf5 100644
--- a/app/controllers/api/v1/statuses/bookmarks_controller.rb
+++ b/app/controllers/api/v1/statuses/bookmarks_controller.rb
@@ -3,7 +3,7 @@
 class Api::V1::Statuses::BookmarksController < Api::BaseController
   include Authorization
 
-  before_action -> { doorkeeper_authorize! :write }
+  before_action -> { doorkeeper_authorize! :write, :'write:bookmarks' }
   before_action :require_user!
 
   respond_to :json