summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Leone <git@andrealeone.xyz>2019-09-07 10:18:31 +0200
committerAndrea Leone <git@andrealeone.xyz>2019-09-07 10:45:52 +0200
commitb807b42aa3bac6c527485d30f953f7b2f1323a95 (patch)
tree5947760e3a3fdd3afaf1a3a6cc25525486350b0b
parent00bcd3584a2577ef033d5edc24f806ca0ec8e033 (diff)
downloadgitlab-ce-b807b42aa3bac6c527485d30f953f7b2f1323a95.tar.gz
Expose :protected field for ../tags/:tag_name API endpoint
-rw-r--r--lib/api/entities.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index f7cd6d35854..3c7fa8caa61 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -1263,6 +1263,11 @@ module API
options[:project].releases.find_by(tag: repo_tag.name)
end
# rubocop: enable CodeReuse/ActiveRecord
+
+ expose :protected do |repo_tag, options|
+ ::ProtectedTag.protected?(options[:project], repo_tag.name)
+ end
+
end
class Runner < Grape::Entity