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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
1f0502df
Commit
1f0502df
authored
Oct 22, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug where internal email pattern wasn't respected
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f2ef5e2e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
app/services/users/build_service.rb
app/services/users/build_service.rb
+4
-4
changelogs/unreleased/52940-fix-internal-email-pattern-not-respected.yml
...leased/52940-fix-internal-email-pattern-not-respected.yml
+5
-0
spec/services/users/build_service_spec.rb
spec/services/users/build_service_spec.rb
+3
-3
No files found.
app/services/users/build_service.rb
View file @
1f0502df
...
@@ -95,10 +95,6 @@ module Users
...
@@ -95,10 +95,6 @@ module Users
if
params
[
:reset_password
]
if
params
[
:reset_password
]
user_params
.
merge!
(
force_random_password:
true
,
password_expires_at:
nil
)
user_params
.
merge!
(
force_random_password:
true
,
password_expires_at:
nil
)
end
end
if
user_default_internal_regex_enabled?
&&
!
user_params
.
key?
(
:external
)
user_params
[
:external
]
=
user_external?
end
else
else
allowed_signup_params
=
signup_params
allowed_signup_params
=
signup_params
allowed_signup_params
<<
:skip_confirmation
if
skip_authorization
allowed_signup_params
<<
:skip_confirmation
if
skip_authorization
...
@@ -109,6 +105,10 @@ module Users
...
@@ -109,6 +105,10 @@ module Users
end
end
end
end
if
user_default_internal_regex_enabled?
&&
!
user_params
.
key?
(
:external
)
user_params
[
:external
]
=
user_external?
end
user_params
user_params
end
end
...
...
changelogs/unreleased/52940-fix-internal-email-pattern-not-respected.yml
0 → 100644
View file @
1f0502df
---
title
:
Fix a bug where internal email pattern wasn't respected
merge_request
:
22516
author
:
type
:
fixed
spec/services/users/build_service_spec.rb
View file @
1f0502df
...
@@ -159,9 +159,9 @@ describe Users::BuildService do
...
@@ -159,9 +159,9 @@ describe Users::BuildService do
true
|
true
|
'fl@example.com'
|
''
|
true
true
|
true
|
'fl@example.com'
|
''
|
true
true
|
false
|
'fl@example.com'
|
''
|
true
true
|
false
|
'fl@example.com'
|
''
|
true
true
|
nil
|
'fl@example.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
tru
e
true
|
nil
|
'fl@example.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
fals
e
true
|
true
|
'fl@example.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
tru
e
true
|
true
|
'fl@example.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
fals
e
true
|
false
|
'fl@example.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
tru
e
true
|
false
|
'fl@example.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
fals
e
true
|
nil
|
'tester.ext@domain.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
true
true
|
nil
|
'tester.ext@domain.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
true
true
|
true
|
'tester.ext@domain.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
true
true
|
true
|
'tester.ext@domain.com'
|
'^(?:(?!\.ext@).)*$\r?'
|
true
...
...
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