From 08cc6afc6eaa05fbc072452901a7d381bbdb2af8 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Sat, 25 Aug 2018 05:38:54 +0000 Subject: API: Protected tags --- app/models/protected_tag.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models/protected_tag.rb') diff --git a/app/models/protected_tag.rb b/app/models/protected_tag.rb index a36f0d36262..94746141945 100644 --- a/app/models/protected_tag.rb +++ b/app/models/protected_tag.rb @@ -4,6 +4,8 @@ class ProtectedTag < ActiveRecord::Base include Gitlab::ShellAdapter include ProtectedRef + validates :name, uniqueness: { scope: :project_id } + protected_ref_access_levels :create def self.protected?(project, ref_name) -- cgit v1.2.3