gitlab-org--gitlab-foss/app/models/concerns/protected_branch_access.rb
2016-10-24 11:33:38 +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