summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-09-01 12:42:22 +0000
committerNick Thomas <nick@gitlab.com>2019-09-01 12:42:22 +0000
commita8a10a00388667ca24ef09a7555f86e40ae52dfa (patch)
tree6aaf266275eb7ceae23a40ffb9da9f9da8287dea /app
parentbff1b4f0d7f862d96b025f4d18085b46904a251c (diff)
parente8dd299e7cb4fbb622359d762089367267ed5c09 (diff)
downloadgitlab-ce-a8a10a00388667ca24ef09a7555f86e40ae52dfa.tar.gz
Merge branch 'improve-chatops-help' into 'master'
Improve chatops help output See merge request gitlab-org/gitlab-ce!32208
Diffstat (limited to 'app')
-rw-r--r--app/models/project_services/slash_commands_service.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/project_services/slash_commands_service.rb b/app/models/project_services/slash_commands_service.rb
index cb16ad75d14..5bfd06476f0 100644
--- a/app/models/project_services/slash_commands_service.rb
+++ b/app/models/project_services/slash_commands_service.rb
@@ -35,7 +35,9 @@ class SlashCommandsService < Service
chat_user = find_chat_user(params)
if chat_user&.user
- return Gitlab::SlashCommands::Presenters::Access.new.access_denied unless chat_user.user.can?(:use_slash_commands)
+ unless chat_user.user.can?(:use_slash_commands)
+ return Gitlab::SlashCommands::Presenters::Access.new.access_denied(project)
+ end
Gitlab::SlashCommands::Command.new(project, chat_user, params).execute
else