2016-07-05 03:40:42 -04:00
|
|
|
class ProtectedBranch::MergeAccessLevel < ActiveRecord::Base
|
2016-08-16 01:09:13 -04:00
|
|
|
include ProtectedBranchAccess
|
|
|
|
|
2016-07-29 02:13:07 -04:00
|
|
|
validates :access_level, presence: true, inclusion: { in: [Gitlab::Access::MASTER,
|
|
|
|
Gitlab::Access::DEVELOPER] }
|
2016-07-08 02:15:02 -04:00
|
|
|
|
2016-07-13 23:42:16 -04:00
|
|
|
def self.human_access_levels
|
|
|
|
{
|
2016-07-29 02:13:07 -04:00
|
|
|
Gitlab::Access::MASTER => "Masters",
|
|
|
|
Gitlab::Access::DEVELOPER => "Developers + Masters"
|
2016-07-13 23:42:16 -04:00
|
|
|
}.with_indifferent_access
|
|
|
|
end
|
2016-07-05 03:40:42 -04:00
|
|
|
end
|