2017-03-15 22:29:07 +00:00
|
|
|
class ProtectedTag < ActiveRecord::Base
|
|
|
|
include Gitlab::ShellAdapter
|
2017-04-03 14:17:24 +00:00
|
|
|
include ProtectedRef
|
2017-03-15 22:29:07 +00:00
|
|
|
|
|
|
|
has_many :push_access_levels, dependent: :destroy
|
|
|
|
|
|
|
|
validates :push_access_levels, length: { is: 1, message: "are restricted to a single instance per protected tag." }
|
|
|
|
|
|
|
|
accepts_nested_attributes_for :push_access_levels
|
|
|
|
end
|