47 Commits

Author SHA1 Message Date
Scott Jacobsen
4837bb0a4e Allow objects to specify their devise scope.
Introspecting the scope of an object can make it difficult to use
wrapper patterns. See issue plataformatec/devise#3307 for an example.

Allow objects to specify their scope explicitly by implementing
`devise_scope`.
2015-03-03 22:37:25 -07:00
micat
7b5293906b Return Symbol in find_scope! if String passed 2014-08-24 21:36:11 +09:00
Erik Michaels-Ober
3f03ec02ad Cleanup trailing whitespace 2013-12-05 09:03:32 +01:00
José Valim
dff7891b97 Get rid of token authentication 2013-09-02 19:15:47 -03:00
José Valim
9a6ac7ab69 Add confirmable to admin. 2011-12-11 20:07:50 +01:00
José Valim
bd27bf7677 Deprecate and disable old behavior accumulated with time. 2011-12-04 23:58:19 +01:00
José Valim
261c01dfa3 Allow :skip => :all 2011-09-14 16:52:28 -07:00
José Valim
4fd866d113 User cannot access sign up and similar pages if he is already signed in through a cookie or token, closes #1036. 2011-04-29 08:56:57 +02:00
José Valim
d8016ea3fd Ensure namespaces has proper scoped views, closes #654 2010-11-20 21:41:26 +01:00
bUg
94622054de tests for Devise::Mapping.find_by_path! 2010-10-30 08:57:14 +08:00
José Valim
611261c64e More tests for Omniauth. 2010-10-18 15:00:34 +02:00
José Valim
1ed674afa8 Use Admin in old rememberable tests. 2010-09-25 12:04:38 +02:00
Martin Rehfeld
f04e633542 provide :sign_out_via option for Devise::Mapping 2010-08-13 19:16:58 +08:00
José Valim
2602ef41cf Do not add unlock routes unless unlock strategy is email or both, closes #373 2010-07-12 07:24:21 +02:00
José Valim
ae6322efb5 No longer retrieve the user from paths, but use the env hash. This change deprecates use_default_scope.
If you have non conventional routes and want to specify the scope for a controller, you can do that at the router level:

  as :user do
    get "/sign_in", :to => "devise/session#new"
  end

This is saying: when accessing "/sign_in", devise should use the user scope. Meaning that users signed through that form will be signed to the user scope.
2010-07-06 01:33:32 +02:00
José Valim
18cccae82f Update bundler, Rails and improve tests for previous commit. 2010-07-02 08:12:00 +02:00
José Valim
2103a673f0 Allow devise_for to be scoped with the scope method. This commit requires latest commits in Rails master. 2010-06-30 12:41:44 +02:00
José Valim
6bd0c7fc2b :as and :scope in routes is deprecated. Use :path and :singular instead. Closes #199. 2010-04-15 08:21:13 +02:00
José Valim
65b8908960 Create authenticatable base model and strategy. 2010-03-29 20:52:48 +02:00
José Valim
1c5d4771ff Initial work on making the authentication stack more flexible. 2010-03-29 16:13:19 +02:00
José Valim
033db1ca7c Do not depend on silence_missing_strategies! anymore. This speeds up strategies matching because we don't need to check if the model duck types to the strategy and it doesn't trigger uneeded strategies. 2010-03-28 14:55:05 +02:00
José Valim
ca4e09390e Compatibility with Ruby 1.9.1 and 1.9.2. 2010-03-26 11:27:19 +01:00
José Valim
ae729aedc3 Allow devise to work with association proxies. 2010-03-26 10:19:31 +01:00
José Valim
3f0bae1968 Allow to give :skip in devise_for to skip routes for an specific controller. 2010-03-12 09:54:57 +01:00
José Valim
038627574c Keep modules definition in a different file. 2010-03-03 12:03:43 +01:00
José Valim
1c6f18cb8b Since Devise::FailureApp is now a metal, we can get rid of this default_url_options stuff. 2010-02-19 10:13:53 +01:00
José Valim
e6e66481b8 Got all tests in test/models and failure app ones passing. 369 tests, 805 assertions, 13 failures, 2 errors. 2010-02-16 17:00:36 +01:00
Carlos Antonio da Silva
445070f6ec Use sign_up instead of registration in routes. Fix issue with users being signed in while attempting to sign up with info from already existing user. Also fix signed up flash. 2010-02-08 11:03:15 -02:00
Carlos Antonio da Silva
6b837cb285 Introducing Registerable module, allowing users to sign up. 2010-02-04 20:08:38 -02:00
David Palm
bc05d28d3f Devise::Mapping#raw_path does not consider relative_url_root so that route helpers work (no more session_path(:user) => '/abc/abc/users/sign_in')
Devise::Mapping#parsed_path considers relative_url_root so that initial redirects still work with non empty relative_url_roots
2010-01-22 23:03:48 +08:00
David Palm
5ca178aa7e Devise::Mapping#raw_path considers the relative_url_root to fix issue with Passenger and RailsBaseURI directives
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-01-13 17:30:27 +01:00
José Valim
0819f87255 Test different ORMs 2009-12-21 15:29:58 +01:00
José Valim
de40777334 Extract common logic into the same method. 2009-11-16 15:07:01 -02:00
José Valim
1eb021e590 Add some specs to find_by_class. 2009-11-15 15:14:08 -02:00
Carlos Antonio da Silva
836770a9f2 Allow passing options from devise_for to route definitions, useful on subdomain scenarios. 2009-11-13 08:49:22 -02:00
José Valim
05678e773f Added support to config.default_url_options. 2009-11-06 20:59:36 -02:00
José Valim
4debe4080b Allow :path_prefix to be given to devise_for. 2009-11-06 14:27:27 -02:00
José Valim
371a9bb0d0 Major refactoring. Allow Warden::Manager to be configured through Devise, undeprecate Devise.confirm_within, Devise.pepper and friends and move Rails hooks to their own file. 2009-11-03 09:35:11 -02:00
José Valim
b28d7e8b1c Renamed authenticable to authenticatable and added deprecation warnings. 2009-10-30 08:29:10 -02:00
Carlos A. da Silva
28a7f78fba Creating rememberable module. 2009-10-20 00:31:33 -02:00
Carlos A. da Silva
9a10709545 Fixing singular options for mappings. 2009-10-18 18:19:04 -02:00
Carlos A. da Silva
d87ff26cbd Allow setup of path_names in devise_for mapping for overwriting sign_in, sign_out, password and confirmation keywords. 2009-10-16 20:46:06 -03:00
José Valim
f1cecacc99 Move mappings to routes. 2009-10-12 21:49:51 -03:00
José Valim
5848f12cc1 Added magic predicates to mapping. 2009-10-12 21:06:39 -03:00
José Valim
e50dfcc73f More specs. 2009-10-12 09:56:12 -03:00
José Valim
78525e2536 More tests 2009-10-12 08:49:28 -03:00
José Valim
43a13bf2fe Add missing files. 2009-10-12 08:37:42 -03:00