diff options
author | Florent Dubois <florent.dubois@devaddict.io> | 2017-12-06 12:07:08 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-08-22 12:16:48 +0100 |
commit | b63ed7cff664bc1ee0bf70912fffd4814f757079 (patch) | |
tree | 241982a476e831b971121e66b47348dc370c0b34 /lib/api/helpers | |
parent | 1c95c5ec867b31389b513bd09a9cadc5f3fb6836 (diff) | |
download | gitlab-ce-b63ed7cff664bc1ee0bf70912fffd4814f757079.tar.gz |
Allow date parameters on Issues and Notes API for group owners
- Allow `created_at` and `updated_at` parameters on Issues API
- Allow `created_at` on Issue Notes API
Closes gitlab-org/gitlab-ce#40059
Diffstat (limited to 'lib/api/helpers')
-rw-r--r-- | lib/api/helpers/notes_helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/helpers/notes_helpers.rb b/lib/api/helpers/notes_helpers.rb index e2984b08eca..7885e3fa1e1 100644 --- a/lib/api/helpers/notes_helpers.rb +++ b/lib/api/helpers/notes_helpers.rb @@ -94,7 +94,7 @@ module API if opts[:created_at] opts.delete(:created_at) unless - current_user.admin? || parent.owned_by?(current_user) + (current_user.admin? || user_project.owner == current_user || current_user.owned_groups.include?(user_project.owner)) end opts[:updated_at] = opts[:created_at] if opts[:created_at] |