2016-09-13 17:45:13 +05:30
|
|
|
module ProtectedBranchAccess
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
included do
|
|
|
|
scope :master, -> { where(access_level: Gitlab::Access::MASTER) }
|
|
|
|
scope :developer, -> { where(access_level: Gitlab::Access::DEVELOPER) }
|
|
|
|
end
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
def humanize
|
|
|
|
self.class.human_access_levels[self.access_level]
|
|
|
|
end
|
|
|
|
end
|