summaryrefslogtreecommitdiff
path: root/app/models/concerns/protected_branch_access.rb
blob: dd6b34d934b989942d44b13d0af36547f5f84cad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
module ProtectedBranchAccess
  extend ActiveSupport::Concern

  included do
    scope :master, -> () { where(access_level: Gitlab::Access::MASTER) }
    scope :developer, -> () { where(access_level: Gitlab::Access::DEVELOPER) }
  end

  def humanize
    self.class.human_access_levels[self.access_level]
  end
end