summaryrefslogtreecommitdiff
path: root/app/models/user_highest_role.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-19 00:09:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-19 00:09:27 +0000
commit77d15aff0eaa7dd8a8ce988436a502c5ab6bb55b (patch)
tree7e5a828e67a98dbb3b7eb1f73b569d15bbcf0f45 /app/models/user_highest_role.rb
parent8b5c2a4525819c6b18f422b4baa0f6568286909b (diff)
downloadgitlab-ce-77d15aff0eaa7dd8a8ce988436a502c5ab6bb55b.tar.gz
Add latest changes from gitlab-org/gitlab@master
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