308 Commits

Author SHA1 Message Date
Lucas Mazza
aea82d0b03 Update remaning 1.8 hash syntax. 2014-02-25 14:25:55 -03:00
Anshul Sharma
dc1b399a8b Updated ruby 1.9 hash syntax 2014-02-25 22:12:55 +05:30
rbsec
13b50d63ca Set autocomplete=off on all password inputs 2014-02-21 10:37:17 +00:00
Ezequiel Delpero
989071144e Adds yield around resource on devise controllers
If you want to add a new behavior to your devise
controllers but you don't want to override devise's
default workflow, just pass a block around resource.

This would give you for example, the ability to
trigger background jobs after user signs in.
2013-11-08 20:43:08 -03:00
José Valim
4f1bf8f3f9 Split out sign_in/out functionality so it can be reused in hooks 2013-11-06 20:55:26 +01:00
andrew morton
52a3768451 A GET to sign in shouldn't extend the session. 2013-11-06 20:20:22 +01:00
Kaworu
c87809a0f5 Separate redirects and flash messages in navigational_formats and flashing_formats 2013-11-01 21:47:40 +01:00
Benoit Bénézech
04e47687b2 remove respond_to in favor of an implementation that returns options 2013-10-24 17:29:53 +02:00
Vasiliy Ermolovich
036715facc do not define mailer if ActionMailer is not defined
closes #2659
2013-10-03 17:39:04 +03:00
Greg Gates
989d7192fa Tweaks confirmation flow for signed_in users
For #2627

When allow_unconfirmed_access_for > 0, users may
be already signed in at the time they confirm
their account. Consequently, the default
confirmation should be compatible with this
possibility. Additionally, they should not be
redirected to the sign in form after confirmation
in this case. So I've changed
ConfirmationsController#after_confirmation_path_for
to send the user to the root path when signed in,
or the sign in form otherwise.
2013-09-16 10:12:15 -04:00
José Valim
6b3b0c5e8c Remove deprecated token lookups 2013-09-02 19:23:15 -03:00
José Valim
2d919fba32 Merge pull request #2582 from tod-uma/master
Allowed updating of attributes without a password if password_required? resolves to false.
2013-09-02 14:46:08 -07:00
Greg Gates
fc251c306c Fixes incorrect flash message on confirmation
The :confirmed default message in devise.en.yml
used to say "You are now signed in." This is no
longer the default behavior in v3.1.0.

This commit renames that message to
:confirmed_and_signed_in and changes the :confirmed
message to be appropriate for the default post-
confirmation location (which is now the new session
page). The new :confirmed message reads:

"Your account was successfully confirmed. Please
sign in."
2013-08-30 17:16:56 -04:00
Tod Detre
66c829eef4 created update_resource method to allow subclass overwritting 2013-08-21 11:04:32 -04:00
Tod Detre
6a22e88dfa Allowed updating of attributes without a password if password_required? resolves to false 2013-08-20 16:36:35 -04:00
José Valim
58cbd91512 Do not do double redirect on after confirmation path 2013-08-13 18:55:50 +02:00
José Valim
4e318b5167 Simplify parameter sanitization proposal 2013-08-11 22:20:59 +02:00
José Valim
d0219d914f Merge pull request #2560 from aarvay/patch-1
Added an extra validation to shared links
2013-08-08 13:37:45 -07:00
José Valim
3dccf3c6ff Do not sign in after confirmation 2013-08-08 22:33:58 +02:00
Vignesh Rajagopalan
acd33174fc Added an extra validation to shared links 2013-08-08 18:05:19 +05:30
José Valim
143794d701 Use HMAC on tokens stored in the DB 2013-08-05 18:56:07 +02:00
José Valim
7e96bac6a4 Get rid of deprecated code 2013-08-05 11:24:04 +02:00
Carlos Antonio da Silva
ae4448403c Change flash message to alert instead of error
Devise uses the defaults :notice and :alert everywhere, this one seems to
have been missed since it was introduced in
ff75341c75.
2013-05-29 21:34:28 -03:00
Jesse B. Hannah
545a5cec3b Fix redundant assignment of self.resource in Devise::RegistrationsController
Devise::RegistrationsController#create set self.resource to the return value of build_resource--which is nil, because build_resource sets self.resource to an actual resource object. This caused attempting to save the resource (two lines down) to fail with "undefined method `save' on nil:NilClass."
2013-05-09 18:33:30 -06:00
Carlos Antonio da Silva
eb0ad1c21a Merge branch 'master' into rails4 2013-05-07 13:01:34 -03:00
José Valim
ef2a2280a3 Update examples to be compatible with Rails 4 2013-05-07 08:18:12 -06:00
Sebastian Wramba
43f7cf0f12 No redirect when Devise API is accessed via JSON 2013-05-07 10:18:23 +02:00
Tan Jun Rong
804fbdf6d5 Fix spelling error, 'reseting' to 'resetting' 2013-04-22 22:25:40 +08:00
Tan Jun Rong
e4987e8bb7 Fix resource_name to resource 2013-04-22 21:40:52 +08:00
Tan Jun Rong
9d5a9c8a61 Add ability to override the redirect path after user has reset their password 2013-04-22 20:22:53 +08:00
Lucas Mazza
93013c2e89 Merge pull request #2366 from hauleth/extract-lookup-for-i18n
Extract get_message
2013-04-14 08:21:19 -07:00
José Valim
8a93c34080 Clean up Devise parameter sanitizer 2013-04-13 23:21:46 -07:00
Carlos Antonio da Silva
36557ef641 ✂️ [ci skip] 2013-04-13 10:53:49 -03:00
Drew Ulmer
d20fdf87b6 Introduce BaseSanitizer null sanitizer and controller-specific callbacks
This updates Devise's StrongParameter support to feature:

- A Null base sanitizer to support existing Rails 3.x installations that
  don't want to use StrongParameters yet
- A new, simpler API for ParameterSanitizer: #permit, #permit!, and #forbid
- Overrideable callbacks on a controller-basis, e.g. #create_sessions_params
  for passing the current scope's parameters through StrongParameters and
  a helper method, whitelisted_params, for rolling your own implementations
  of #create_x_params in your own controllers.
- Lots of tests!
2013-04-10 10:33:50 -05:00
Łukasz Niemier
95f56258d7 Rename get_message to find_message and fix set_flash_message 2013-04-07 08:52:11 +02:00
Łukasz Niemier
8e9ad4626e Extract get_message 2013-04-06 18:46:21 +02:00
Drew Ulmer
77203e3d97 Change parameter sanitizer instance method to scope to devise
This way it's very explicit that this method is for devise and it won't
run into any naming collisions with user code.
2013-04-01 09:46:46 -05:00
Drew Ulmer
78f137368c Add support for Rails 4 strong_parameters
This brings support for Rails 4 StrongParameters changes.

- Parameter sanitizing is setup for Devise controllers via
  resource_params except Omniauth Callbacks which doesn't use
  resource_params.

- Change #build_resource to not call resource_params for get requests.
  Parameter sanitizing is only needed when params are posted to the
  server so there's no need to try to construct resource params on get
  requests (new, edit).
2013-03-31 21:31:48 -05:00
Puneet Goyal
ddea9359a6 Removing an extra full stop 2013-03-15 15:19:52 +05:30
Carlos Antonio da Silva
af37800c1d Change match routes to get / post
match without a verb is deprecated in Rails master.
2013-01-28 20:23:13 -02:00
Jay Shepherd
cc017b1f0d Allow parent_mailer to be customizable via Devise.parent_mailer, useful for engines 2013-01-18 02:26:41 -06:00
José Valim
0c4615e337 Properly check if reconfirmable is available 2013-01-13 09:53:26 +01:00
Steve Robinson
70e38fe66d Changed link_to to button_to for delete user
It is advisable to use link_to for mostly GET operations. Actions like DESTROY when presented as a link can cause severe vulnerabilities.
Hence using a button is advisable.
2013-01-12 01:53:09 +05:30
José Valim
8fa3951bea Update app/controllers/devise/sessions_controller.rb 2013-01-06 11:07:51 +01:00
Alan Larkin
f2de7bf84c Fixed bug in SessionsController#destroy which caused all XHR requests, regardless of `Accept' header, to be treated as 'text/html'. 2013-01-06 03:50:26 +00:00
José Valim
19b5bcbe0f Accept mail options in Devise::Mailer and deprecate headers_for 2013-01-04 18:52:49 +01:00
Graham Wagener
5745d97232 Improved grammar of reset password e-mail. 2012-12-14 15:08:55 +13:00
José Valim
86f0bff332 Apparently Rails 3.1 does not like @headers as ivar 2012-12-13 09:59:36 +01:00
José Valim
30ab6f923d Release 2.2.0.rc 2012-12-13 09:20:46 +01:00
José Valim
839e8fc8ac Show if there is an e-mail waiting for confirmation, closes #2060 2012-12-13 09:13:33 +01:00