Skip to content
This repository has been archived by the owner on Dec 22, 2018. It is now read-only.

Commit

Permalink
Also clean params
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Groeneveld committed Aug 1, 2014
1 parent 1ed061f commit 1396ba1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def user_params
:signature,
:agent,
:notify,
label_ids: [],
)

# prevent normal user from changing email and role
unless current_user.agent?
attributes.delete(:email)
attributes.delete(:agent)
attributes.delete(:label_ids)
end

return attributes
Expand Down

0 comments on commit 1396ba1

Please sign in to comment.