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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user_highest_role.rb')
-rw-r--r--app/models/user_highest_role.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/user_highest_role.rb b/app/models/user_highest_role.rb
index dc166273787..4853fc3d248 100644
--- a/app/models/user_highest_role.rb
+++ b/app/models/user_highest_role.rb
@@ -4,4 +4,6 @@ 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