gitlab-org--gitlab-foss/app/models/protected_branch/merge_access_level.rb

14 lines
448 B
Ruby
Raw Normal View History

class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base
include ProtectedBranchAccess
validates :access_level, presence: true, inclusion: { in: [Gitlab::Access::MASTER,
Gitlab::Access::DEVELOPER] }
def self.human_access_levels
{
Gitlab::Access::MASTER => "Masters",
Gitlab::Access::DEVELOPER => "Developers + Masters"
}.with_indifferent_access
end
end