2020-03-12 14:09:28 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class UserHighestRole < ApplicationRecord
|
|
|
|
belongs_to :user, optional: false
|
|
|
|
|
|
|
|
validates :highest_access_level, allow_nil: true, inclusion: { in: Gitlab::Access.all_values }
|
2020-03-18 20:09:27 -04:00
|
|
|
|
|
|
|
scope :with_highest_access_level, -> (highest_access_level) { where(highest_access_level: highest_access_level) }
|
2020-03-12 14:09:28 -04:00
|
|
|
end
|