diff options
author | Stan Hu <stanhu@gmail.com> | 2019-05-18 18:06:20 +0300 |
---|---|---|
committer | George Tsiolis <tsiolis.g@gmail.com> | 2019-08-05 11:21:41 +0300 |
commit | caac3104c4e77a40ad8ec3d1275f7b47c0fc8f68 (patch) | |
tree | 2c0fec3d934326d1b28401289dfd330e13c6b7b5 /app/models | |
parent | 523e00abd74a9067fb17129faa1d35bfa107e04a (diff) |
Make it easier to find invited group members
We had a number of team members struggle to find invited members of a
group. Searching for the e-mail address did not work because search only
works with members with user accounts.
This commit changes two things:
1. Breaks out the invited members into a separate table.
2. Adds search capability for the invited members.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/61948
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/member.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/member.rb b/app/models/member.rb index c7583434148..ada779f0583 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -107,6 +107,10 @@ class Member < ApplicationRecord joins(:user).merge(User.search(query)) end + def search_invited(query) + invite.where(['invite_email ILIKE ?', "%#{query}%"]) + end + def filter_by_2fa(value) case value when 'enabled' |