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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
2c620713
Commit
2c620713
authored
Mar 31, 2016
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow temp-oauth-email as notification email
parent
95c7aa62
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
CHANGELOG
CHANGELOG
+1
-0
app/models/user.rb
app/models/user.rb
+2
-0
spec/models/user_spec.rb
spec/models/user_spec.rb
+7
-0
No files found.
CHANGELOG
View file @
2c620713
...
...
@@ -18,6 +18,7 @@ v 8.7.0 (unreleased)
v 8.6.3 (unreleased)
- Destroy related todos when an Issue/MR is deleted. !3376
- Fix error 500 when target is nil on todo list. !3376
- Allow temporary email as notification email. !TBD
v 8.6.2
- Fix dropdown alignment. !3298
...
...
app/models/user.rb
View file @
2c620713
...
...
@@ -408,6 +408,8 @@ class User < ActiveRecord::Base
end
def
owns_notification_email
return
if
self
.
temp_oauth_email?
self
.
errors
.
add
(
:notification_email
,
"is not an email you own"
)
unless
self
.
all_emails
.
include?
(
self
.
notification_email
)
end
...
...
spec/models/user_spec.rb
View file @
2c620713
...
...
@@ -173,6 +173,13 @@ describe User, models: true do
expect
(
user
).
to
be_invalid
end
end
context
'owns_notification_email'
do
it
'accepts temp_oauth_email emails'
do
user
=
build
(
:user
,
email:
"temp-email-for-oauth@example.com"
)
expect
(
user
).
to
be_valid
end
end
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