Carlos Antonio da Silva
2135ae5e5e
Change email_change => email_changed notification
...
This better indicates what the setting is for, and when it's supposed to
be triggered.
We might eventually deprecate the existing password_change on in favor
of password_changed.
2017-03-10 08:56:34 -03:00
Carlos Antonio da Silva
70eb18d766
Notify original user email when the email changes
...
This adds a new setting `send_email_change_notification` which will
send an email to the original user email when their email is updated to
a new one.
It doesn't take into account the reconfirmable setting yet, it will be
added next, so that if confirmable is included and reconfirmable is
being used, the email will be triggered when the email change is
requested, not when confirmed (e.g when we store the email in
`unconfirmed_email`, not when it's later copied to `email` when that is
confirmed).
2017-03-06 17:04:26 -03:00
Lucas Mazza
a2498074f1
Replace custom Array assertion with assert_equal.
2016-05-03 14:18:35 -03:00
Lucas Mazza
536279b05b
Replace homemade assert_not matcher in favor of refute.
2016-05-03 13:57:10 -03:00
George Guimarães
c4b4411513
Change encryption for hashing in the documentation.
...
Throughout the documentations, we are using 'encrypt' incorrectly.
Encrypt means that someone will eventually decrypt the message,
which is obviously not the case for Devise.
I'm changing the docs to use 'hashing' instead.
However, I left the database field as `encrypted_password` for now.
I'll update the db field in an upcoming PR.
2016-02-10 17:10:52 -02:00
Jon Phenow
e9c82472ff
quick comment touch-ups
2015-08-27 10:26:12 -05:00
Jon Phenow
c744dcf07a
tests
2015-08-27 10:26:12 -05:00
Anshul Sharma
dc1b399a8b
Updated ruby 1.9 hash syntax
2014-02-25 22:12:55 +05:30
Rodrigo Navarro
3e3a3ad102
Small typo.
2013-11-28 09:00:59 -02:00
Lucas Mazza
bf5bcd52cb
Bring password_digest back.
...
This method is part of the protected API and is used by custom
encryption engines (like `devise-encryptable`) to hook the custom
encryption logic in the models.
Fixes #2730
2013-11-08 16:22:31 -02:00
Jay Hayes
4861436298
Prevent mutation of orig values during case and wspace sanitizations
2013-10-21 13:21:05 +02:00
Vipul A M
ae6a37f796
Cleanup tests for unused variables
2013-09-15 01:52:53 +05:30
José Valim
72cf2481b5
Rename ParamFilter to ParameterFilter for consistency
2013-06-19 09:17:54 +02:00
Carlos Antonio da Silva
eb0ad1c21a
Merge branch 'master' into rails4
2013-05-07 13:01:34 -03:00
José Valim
e499fadf52
Use persisted? in order to check if the record was destoryed or not
2013-05-07 08:55:30 -06:00
José Valim
5ad122b928
Fix build for mongoid
2013-05-07 08:47:18 -06:00
José Valim
03f2a6a5e4
Merge pull request #2392 from michiel3/master
...
Add destroy_with_password method
2013-05-07 07:11:47 -07:00
Victor Cruz Dueñas
d6d61fc5be
Adding tests for case_insensitive_keys and strip_whitespace_keys to param filter
2013-05-05 01:02:48 +02:00
Michiel Prins
60e933df73
Add destroy_with_password method
2013-04-29 15:06:13 +02:00
Drew Ulmer
af4a582300
Remove mass-assignment role-based tests, no longer supported in Rails 4
...
Mass-assignment security roles are removed in Rails 4 so there's no need
to test :as => :role behavior.
2013-03-31 15:21:49 -05:00
José Valim
5190f52857
Require string conversion for all values
2013-01-26 11:42:42 -07:00
José Valim
33fb89340a
Revert "update_with_password doesn't change encrypted password when it is invalid"
...
This reverts commit 10235f9d72 .
2013-01-11 19:12:53 +01:00
Drew Ulmer
c768366240
Add failing tests for Issue #2204
...
For a point release upgrade, Devise should not throw an exception when trying
to downcase or strip globally configured keys. This would be a breaking
change in functionality and this test demonstrates the issue.
2013-01-09 11:41:20 -06:00
Carlos Antonio da Silva
ac3a25bf2e
Remove nothing raised assertion
...
Let the test raise if that is the case, no need for assert that nothing
was raised.
Hopefully fix the build ✨
2012-12-04 17:49:26 -02:00
Carlos Antonio da Silva
2261005ed5
Refactor a bit to avoid two model attributes lookup
...
Tidy up tests a bit.
2012-12-04 17:37:12 -02:00
Drew Ulmer
0c6f2adf14
Add failing test for #2129
2012-12-01 21:06:11 -06:00
Drew Ulmer
77ec1b08cd
Move test models into their own file so they can be used elsewhere
2012-12-01 21:06:03 -06:00
Vasiliy Ermolovich
10235f9d72
update_with_password doesn't change encrypted password when it is invalid
...
closes #2130
2012-11-06 21:05:17 +03:00
Carlos Galdino
c179cef365
Change the minimum password length to 8
2012-07-06 11:46:46 -03:00
Rodrigo Flores
e3412d4207
No need to sort anymore
2012-02-22 13:55:05 -02:00
Rodrigo Flores
d7337c5b26
Added a missing test and asserting same content for 1.8 compatibility
2012-02-22 13:55:05 -02:00
Rodrigo Flores
2ab1086b80
Test, you shall pass!
2012-02-22 13:55:05 -02:00
Rodrigo Flores
18aef6ac33
Some refactor
2012-02-22 13:55:03 -02:00
Rodrigo Flores
8ac8129fe7
Added required_fields to database_authenticatable
2012-02-22 13:55:01 -02:00
T1D
c9becd3ea1
Allow regular expressions to avoid string conversion for parameter
...
filtering.
2011-12-14 10:41:24 -06:00
Kir
5ba6670164
Added support for rails 3.1 new mass assignment conventions
2011-11-24 12:51:03 +04:00
José Valim
dc8aa9ef83
Move param filtering to its own object and make all finder methods pass through it, closes #1413 .
2011-11-10 10:14:02 -02:00
Chase DuBois
c3432e57b1
Test for previous commit
2011-06-21 20:45:07 -04:00
José Valim
c0017ce76d
Merge pull request #1138 from fschwahn/update_without_password
...
added update_without_password method, closes #801
2011-06-15 10:45:18 -07:00
Stefan Wrobel
8e87a2d80d
Add strip_whitespace_keys which works like case_insensitive_keys but strips whitespace from emails
2011-06-10 01:37:43 -07:00
Xavier Defrang
ab3bb9cf4d
Conditional string conversion of auth params ( Closes #1079 )
2011-05-26 15:45:03 +02:00
Josh Kalderimis
e10bc9e3c0
dup the conditions hash before calling filter_auth_params, this fixes an issue with reseting your password when using a custom auth field like login
2011-05-16 14:08:22 -04:00
fabian
8bdc4b544f
added update_without_password method
2011-05-05 09:24:21 +02:00
SixArm
2a5669967f
Change test email addresses to ues RFC 2606 reserved domain example.com
2011-04-18 15:59:13 +08:00
José Valim
5e2ee5eb6a
Downcase keys before validation.
2011-04-16 12:52:59 +02:00
Mikel Lindsaar
e329930a82
Update DatabaseAuthenticatable#valid_password? to not raise error on empty password
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-04-16 12:41:49 +02:00
Andrew Dahl
8d1e23c67d
add unit and integration tests for case insensitive keys
2010-11-20 15:54:01 +01:00
José Valim
67a49f3b75
Ensure authenticatable_salt can be nil.
2010-11-11 22:51:39 +01:00
José Valim
09088706bb
Extract encryptors into their own module for better bcrypt support.
2010-09-25 16:08:46 +02:00
José Valim
2aa1d2f3b7
Increase the size of the friendly token.
...
The chance of someone to successfully guess a random token in the website is:
(number_of_users / 2388636399360109977557402041718133080829429159844757507642063199359529632522467783435119230976)
2010-09-25 11:51:57 +02:00