Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
434eb3f6
Commit
434eb3f6
authored
Dec 07, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab master
parents
14495f4b
805234a5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
39 deletions
+19
-39
GITLAB_KAS_VERSION
GITLAB_KAS_VERSION
+1
-1
app/models/user.rb
app/models/user.rb
+1
-7
changelogs/unreleased/ash2k-kas-13-7-0.yml
changelogs/unreleased/ash2k-kas-13-7-0.yml
+5
-0
changelogs/unreleased/cat-remove-user-secondary-email-ff.yml
changelogs/unreleased/cat-remove-user-secondary-email-ff.yml
+5
-0
config/feature_flags/development/user_search_secondary_email.yml
...feature_flags/development/user_search_secondary_email.yml
+0
-8
spec/models/user_spec.rb
spec/models/user_spec.rb
+7
-23
No files found.
GITLAB_KAS_VERSION
View file @
434eb3f6
13.
6.1
13.
7.0
app/models/user.rb
View file @
434eb3f6
...
...
@@ -591,13 +591,7 @@ class User < ApplicationRecord
sanitized_order_sql
=
Arel
.
sql
(
sanitize_sql_array
([
order
,
query:
query
]))
search_query
=
if
Feature
.
enabled?
(
:user_search_secondary_email
)
search_with_secondary_emails
(
query
)
else
search_without_secondary_emails
(
query
)
end
search_query
.
reorder
(
sanitized_order_sql
,
:name
)
search_with_secondary_emails
(
query
).
reorder
(
sanitized_order_sql
,
:name
)
end
# Limits the result set to users _not_ in the given query/list of IDs.
...
...
changelogs/unreleased/ash2k-kas-13-7-0.yml
0 → 100644
View file @
434eb3f6
---
title
:
Update gitlab-kas to v13.7.0
merge_request
:
49318
author
:
type
:
changed
changelogs/unreleased/cat-remove-user-secondary-email-ff.yml
0 → 100644
View file @
434eb3f6
---
title
:
Remove user_search_secondary_email feature flag
merge_request
:
49312
author
:
type
:
changed
config/feature_flags/development/user_search_secondary_email.yml
deleted
100644 → 0
View file @
14495f4b
---
name
:
user_search_secondary_email
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47587
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/282137
milestone
:
'
13.7'
type
:
development
group
:
group::access
default_enabled
:
false
spec/models/user_spec.rb
View file @
434eb3f6
...
...
@@ -2078,32 +2078,16 @@ RSpec.describe User do
end
describe
'secondary email matching'
do
context
'feature flag :user_search_secondary_email is enabled'
do
it
'returns users with a matching secondary email'
do
expect
(
described_class
.
search
(
email
.
email
)).
to
include
(
email
.
user
)
end
it
'does not return users with a matching part of secondary email'
do
expect
(
described_class
.
search
(
email
.
email
[
1
...-
1
])).
to
be_empty
end
it
'returns users with a matching secondary email regardless of the casing'
do
expect
(
described_class
.
search
(
email
.
email
.
upcase
)).
to
include
(
email
.
user
)
end
it
'returns users with a matching secondary email'
do
expect
(
described_class
.
search
(
email
.
email
)).
to
include
(
email
.
user
)
end
context
'feature flag :user_search_secondary_email is disabled'
do
before
do
stub_feature_flags
(
user_search_secondary_email:
false
)
end
it
'does not return users with a matching secondary email'
do
expect
(
described_class
.
search
(
email
.
email
)).
not_to
include
(
email
.
user
)
end
it
'does not return users with a matching part of secondary email'
do
expect
(
described_class
.
search
(
email
.
email
[
1
...-
1
])).
to
be_empty
end
it
'does not return users with a matching part of secondary email'
do
expect
(
described_class
.
search
(
email
.
email
[
1
...-
1
])).
to
be_empty
end
it
'returns users with a matching secondary email regardless of the casing'
do
expect
(
described_class
.
search
(
email
.
email
.
upcase
)).
to
include
(
email
.
user
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment