diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-04-06 15:19:45 -0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-04-07 10:53:29 +0100 |
commit | 60c121ebc202e0de31a5a6212346128341d2766b (patch) | |
tree | 34e9b534839ef2b9086849f22ef74126b8410351 /app/services/slash_commands/interpret_service.rb | |
parent | 0a4b853f2ceb0ad6c7394d1056f9139e53b38688 (diff) | |
download | gitlab-ce-60c121ebc202e0de31a5a6212346128341d2766b.tar.gz |
Backport permissions and multi-line array to CE
Diffstat (limited to 'app/services/slash_commands/interpret_service.rb')
-rw-r--r-- | app/services/slash_commands/interpret_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/slash_commands/interpret_service.rb b/app/services/slash_commands/interpret_service.rb index 595653ea58a..49d45ec9dbd 100644 --- a/app/services/slash_commands/interpret_service.rb +++ b/app/services/slash_commands/interpret_service.rb @@ -7,6 +7,8 @@ module SlashCommands # Takes a text and interprets the commands that are extracted from it. # Returns the content without commands, and hash of changes to be applied to a record. def execute(content, issuable) + return [content, {}] unless current_user.can?(:use_slash_commands) + @issuable = issuable @updates = {} |