diff options
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index d95a2507199..c9d4c4dd03b 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -267,6 +267,7 @@ class Ability :create_merge_request, :create_wiki, :push_code, + :resolve_note, :create_container_image, :update_container_image, :create_environment, @@ -448,7 +449,8 @@ class Ability rules += [ :read_note, :update_note, - :admin_note + :admin_note, + :resolve_note ] end @@ -456,6 +458,10 @@ class Ability rules += project_abilities(user, note.project) end + if note.for_merge_request? && note.noteable.author == user + rules << :resolve_note + end + rules end |