summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Leitzen <pl@neopoly.de>2018-07-23 22:37:23 +0200
committerPeter Leitzen <pl@neopoly.de>2018-08-10 16:45:11 +0200
commitc491d86473c55a58811e22ab73e02a22ba216e84 (patch)
tree2667ebe08123a207283747dbb1bebaded40fa911
parent839b776f87d5eb3606720fd5552f3488d91c51f2 (diff)
downloadgitlab-ce-c491d86473c55a58811e22ab73e02a22ba216e84.tar.gz
Hide `/tag` quick action from non-authorised users
-rw-r--r--app/services/quick_actions/interpret_service.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb
index f8dccfa465d..09f39523c35 100644
--- a/app/services/quick_actions/interpret_service.rb
+++ b/app/services/quick_actions/interpret_service.rb
@@ -592,8 +592,7 @@ module QuickActions
tag_name_and_message.split(' ', 2)
end
condition do
- issuable.is_a?(Commit)
- # TODO authorize
+ issuable.is_a?(Commit) && current_user.can?(:push_code, project)
end
command :tag do |(tag_name, message)|
@updates[:tag_name] = tag_name