debian-mirror-gitlab/app/models/protected_tag.rb

11 lines
262 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
class ProtectedTag < ActiveRecord::Base
include Gitlab::ShellAdapter
include ProtectedRef
2017-09-10 17:25:29 +05:30
protected_ref_access_levels :create
2017-08-17 22:00:37 +05:30
def self.protected?(project, ref_name)
self.matching(ref_name, protected_refs: project.protected_tags).present?
end
end