summaryrefslogtreecommitdiff
path: root/app/services/notes
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-20 10:23:13 +0200
committerRémy Coutable <remy@rymai.me>2016-09-20 13:58:14 +0200
commit929ff01ac08db320402c31bb70b463007d1b379d (patch)
tree6a9b09439ce654d18ca8189cdfd785a3e0de10ec /app/services/notes
parent3970640b48fe9647ad97cf795aa2bb44a81d21a8 (diff)
downloadgitlab-ce-929ff01ac08db320402c31bb70b463007d1b379d.tar.gz
Ensure we have a user before checking for their permission in Notes::SlashCommandsService
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/services/notes')
-rw-r--r--app/services/notes/slash_commands_service.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/services/notes/slash_commands_service.rb b/app/services/notes/slash_commands_service.rb
index a14898920a1..2edbd39a9e7 100644
--- a/app/services/notes/slash_commands_service.rb
+++ b/app/services/notes/slash_commands_service.rb
@@ -11,6 +11,7 @@ module Notes
def self.supported?(note, current_user)
noteable_update_service(note) &&
+ current_user &&
current_user.can?(:"update_#{note.noteable_type.underscore}", note.noteable)
end