summaryrefslogtreecommitdiff
path: root/app/models/user_highest_role.rb
blob: 4853fc3d248b792b60b1e2d30b70b593bdb7a043 (plain)
1
2
3
4
5
6
7
8
9
# 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 }

  scope :with_highest_access_level, -> (highest_access_level) { where(highest_access_level: highest_access_level) }
end