summaryrefslogtreecommitdiff
path: root/lib/api/helpers/notes_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/notes_helpers.rb')
-rw-r--r--lib/api/helpers/notes_helpers.rb2
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]