Welcome to mirror list, hosted at ThFree Co, Russian Federation.

user_highest_role.rb « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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