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
0a0207ea
Commit
0a0207ea
authored
Jan 27, 2017
by
Richard Macklin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add notified_of_own_activity to permitted attributes
in Profiles::NotificationsController#update
parent
bd03ca4a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/controllers/profiles/notifications_controller.rb
app/controllers/profiles/notifications_controller.rb
+1
-1
spec/controllers/profiles/notifications_controller_spec.rb
spec/controllers/profiles/notifications_controller_spec.rb
+2
-1
No files found.
app/controllers/profiles/notifications_controller.rb
View file @
0a0207ea
...
...
@@ -17,6 +17,6 @@ class Profiles::NotificationsController < Profiles::ApplicationController
end
def
user_params
params
.
require
(
:user
).
permit
(
:notification_email
)
params
.
require
(
:user
).
permit
(
:notification_email
,
:notified_of_own_activity
)
end
end
spec/controllers/profiles/notifications_controller_spec.rb
View file @
0a0207ea
...
...
@@ -16,10 +16,11 @@ describe Profiles::NotificationsController do
user
=
create_user
sign_in
(
user
)
put
:update
,
user:
{
notification_email:
'new@example.com'
,
admin:
true
}
put
:update
,
user:
{
notification_email:
'new@example.com'
,
notified_of_own_activity:
true
,
admin:
true
}
user
.
reload
expect
(
user
.
notification_email
).
to
eq
(
'new@example.com'
)
expect
(
user
.
notified_of_own_activity
).
to
eq
(
true
)
expect
(
user
.
admin
).
to
eq
(
false
)
expect
(
controller
).
to
set_flash
[
:notice
].
to
(
'Notification settings saved'
)
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