diff options
author | Warren Parad <wparad@gmail.com> | 2018-07-15 15:00:48 +0200 |
---|---|---|
committer | Warren Parad <wparad@gmail.com> | 2018-08-16 19:52:52 +0200 |
commit | 8aed9f08fc681d5653c2bc4b688950caf525579b (patch) | |
tree | a83a8fd2c40b194fa400e40ff1529c48ce76b879 /lib | |
parent | 6f21652f0b79a614ad809dc028aaa28aee16732e (diff) | |
download | gitlab-ce-8aed9f08fc681d5653c2bc4b688950caf525579b.tar.gz |
Add authenticate to events api. fix #49255
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/events.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/events.rb b/lib/api/events.rb index fc4ba5a3188..a415508a632 100644 --- a/lib/api/events.rb +++ b/lib/api/events.rb @@ -1,6 +1,7 @@ module API class Events < Grape::API include PaginationParams + include APIGuard helpers do params :event_filter_params do @@ -24,6 +25,8 @@ module API end resource :events do + allow_access_with_scope :read_user, if: -> (request) { request.get? } + desc "List currently authenticated user's events" do detail 'This feature was introduced in GitLab 9.3.' success Entities::Event @@ -46,6 +49,8 @@ module API requires :id, type: String, desc: 'The ID or Username of the user' end resource :users do + allow_access_with_scope :read_user, if: -> (request) { request.get? } + desc 'Get the contribution events of a specified user' do detail 'This feature was introduced in GitLab 8.13.' success Entities::Event |