diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-24 17:26:08 +1000 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-04-24 17:26:08 +1000 |
commit | 51cc01b6c9468056f40cdc8deb0e4b6414a3ccb9 (patch) | |
tree | b72c20e3bec34a9433eb5115ddec82460d9851d7 /lib/api/helpers/notes_helpers.rb | |
parent | 9447e5c27d8f840eaf4eee9635a5149ab36d93b6 (diff) | |
parent | 2e00c1a72afc4b7388bb46bd6d58608e2ae61899 (diff) | |
download | gitlab-ce-51cc01b6c9468056f40cdc8deb0e4b6414a3ccb9.tar.gz |
Merge branch 'master' into siemens-runner-per-group
Diffstat (limited to 'lib/api/helpers/notes_helpers.rb')
-rw-r--r-- | lib/api/helpers/notes_helpers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/helpers/notes_helpers.rb b/lib/api/helpers/notes_helpers.rb index cd91df1ecd8..b74b8149834 100644 --- a/lib/api/helpers/notes_helpers.rb +++ b/lib/api/helpers/notes_helpers.rb @@ -64,8 +64,10 @@ module API authorize! :create_note, noteable parent = noteable_parent(noteable) + if opts[:created_at] - opts.delete(:created_at) unless current_user.admin? || parent.owner == current_user + opts.delete(:created_at) unless + current_user.admin? || parent.owned_by?(current_user) end project = parent if parent.is_a?(Project) |