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
d97b577a
Commit
d97b577a
authored
Sep 24, 2017
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
must now set the devise default scope (since we now have an :email scope)
and rubocop fixes
parent
d7d335c0
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
app/models/email.rb
app/models/email.rb
+1
-1
app/models/user.rb
app/models/user.rb
+1
-1
config/initializers/devise.rb
config/initializers/devise.rb
+1
-1
spec/controllers/profiles_controller_spec.rb
spec/controllers/profiles_controller_spec.rb
+1
-1
spec/models/email_spec.rb
spec/models/email_spec.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+3
-3
No files found.
app/models/email.rb
View file @
d97b577a
app/models/user.rb
View file @
d97b577a
config/initializers/devise.rb
View file @
d97b577a
...
...
@@ -175,7 +175,7 @@ Devise.setup do |config|
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
config
.
default_scope
=
:user
# now have an :email scope as well, so set the default
# Configure sign_out behavior.
# Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
...
...
spec/controllers/profiles_controller_spec.rb
View file @
d97b577a
...
...
@@ -17,7 +17,7 @@ describe ProfilesController do
it
"allows an email update without confirmation if existing verified email"
do
user
=
create
(
:user
)
email
=
create
(
:email
,
:confirmed
,
user:
user
,
email:
'john@gmail.com'
)
create
(
:email
,
:confirmed
,
user:
user
,
email:
'john@gmail.com'
)
sign_in
(
user
)
put
:update
,
...
...
spec/models/email_spec.rb
View file @
d97b577a
spec/models/user_spec.rb
View file @
d97b577a
...
...
@@ -362,7 +362,7 @@ describe User do
describe
'#check_for_verified_email'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:secondary
)
{
create
(
:email
,
:confirmed
,
email:
'secondary@example.com'
,
user:
user
,
)
}
let
(
:secondary
)
{
create
(
:email
,
:confirmed
,
email:
'secondary@example.com'
,
user:
user
)
}
it
'allows a verfied secondary email to be used as the primary without needing reconfirmation'
do
user
.
update_attributes!
(
email:
secondary
.
email
)
...
...
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