debian-mirror-gitlab/app/models/concerns/protected_branch_access.rb
2016-11-03 12:29:30 +05:30

12 lines
308 B
Ruby

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