Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2018-08-25 08:38:54 +0300
committerNick Thomas <nick@gitlab.com>2018-08-25 08:38:54 +0300
commit08cc6afc6eaa05fbc072452901a7d381bbdb2af8 (patch)
treec6e4f3779ff9ff13e3539681a7ac34488aaa8d16 /app/models/protected_tag.rb
parent26ea5437f17ce2a6546fbfd644b93b7f18896783 (diff)
API: Protected tags
Diffstat (limited to 'app/models/protected_tag.rb')
-rw-r--r--app/models/protected_tag.rb2
1 files changed, 2 insertions, 0 deletions
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)