gitlab-org--gitlab-foss/app/models/protected_branch/merge_access_level.rb
Timothy Andrew 41bf093662 CE-specific changes gitlab-org/gitlab-ee#1137
- Extract all common {push,merge} access level model code into the
  `ProtectedBranchAccess` module

- Use the HTTP verb to define controller specs
2016-11-29 17:38:45 +05:30

13 lines
448 B
Ruby

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