1.1 --- a/apps/backend/config/filters.yml Fri Jul 08 00:33:03 2011 +0200
1.2 +++ b/apps/backend/config/filters.yml Fri Jul 08 00:40:34 2011 +0200
1.3 @@ -1,6 +1,6 @@
1.4 rendering: ~
1.5 security:
1.6 - class: sfGuardBasicSecurityFilter
1.7 + class: sfGuardRememberMeFilter
1.8
1.9 # insert your own filters here
1.10
2.1 --- a/plugins/sfGuardPlugin/LICENSE Fri Jul 08 00:33:03 2011 +0200
2.2 +++ b/plugins/sfGuardPlugin/LICENSE Fri Jul 08 00:40:34 2011 +0200
2.3 @@ -1,4 +1,4 @@
2.4 -Copyright (c) 2004-2006 Fabien Potencier
2.5 +Copyright (c) Fabien Potencier
2.6
2.7 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2.8
3.1 --- a/plugins/sfGuardPlugin/README Fri Jul 08 00:33:03 2011 +0200
3.2 +++ b/plugins/sfGuardPlugin/README Fri Jul 08 00:40:34 2011 +0200
3.3 @@ -47,11 +47,13 @@
3.4
3.5 $ symfony guard:create-user fabien $ecret
3.6
3.7 - * Optionally enable the "Remember Me" filter in `filters.yml`
3.8 + * Optionally add the "Remember Me" filter to `filters.yml` above the security filter:
3.9
3.10 [yml]
3.11 - security:
3.12 - class: sfGuardBasicSecurityFilter
3.13 + remember_me:
3.14 + class: sfGuardRememberMeFilter
3.15 +
3.16 + security: ~
3.17
3.18 Secure your application
3.19 -----------------------
3.20 @@ -212,7 +214,7 @@
3.21 The super administrator flag cannot be set on the web, you must set the flag
3.22 directly in the database or use the pake task:
3.23
3.24 - $ symfony promote-super-admin admin
3.25 + $ symfony guard:promote admin
3.26
3.27 Validators
3.28 ----------
4.1 --- a/plugins/sfGuardPlugin/lib/form/sfGuardFormSignin.class.php Fri Jul 08 00:33:03 2011 +0200
4.2 +++ b/plugins/sfGuardPlugin/lib/form/sfGuardFormSignin.class.php Fri Jul 08 00:40:34 2011 +0200
4.3 @@ -1,6 +1,6 @@
4.4 <?php
4.5
4.6 -class sfGuardFormSignin extends sfForm
4.7 +class sfGuardFormSignin extends BasesfGuardFormSignin
4.8 {
4.9 public function configure()
4.10 {
5.1 --- a/plugins/sfGuardPlugin/lib/form/sfGuardGroupPermissionForm.class.php Fri Jul 08 00:33:03 2011 +0200
5.2 +++ b/plugins/sfGuardPlugin/lib/form/sfGuardGroupPermissionForm.class.php Fri Jul 08 00:40:34 2011 +0200
5.3 @@ -5,7 +5,7 @@
5.4 *
5.5 * @package form
5.6 * @subpackage sf_guard_group_permission
5.7 - * @version SVN: $Id: sfGuardGroupPermissionForm.class.php 9999 2008-06-29 21:24:44Z fabien $
5.8 + * @version SVN: $Id: sfGuardGroupPermissionForm.class.php 7745 2008-03-05 11:05:33Z fabien $
5.9 */
5.10 class sfGuardGroupPermissionForm extends BasesfGuardGroupPermissionForm
5.11 {
6.1 --- a/plugins/sfGuardPlugin/lib/form/sfGuardRememberKeyForm.class.php Fri Jul 08 00:33:03 2011 +0200
6.2 +++ b/plugins/sfGuardPlugin/lib/form/sfGuardRememberKeyForm.class.php Fri Jul 08 00:40:34 2011 +0200
6.3 @@ -5,7 +5,7 @@
6.4 *
6.5 * @package form
6.6 * @subpackage sf_guard_remember_key
6.7 - * @version SVN: $Id: sfGuardRememberKeyForm.class.php 9999 2008-06-29 21:24:44Z fabien $
6.8 + * @version SVN: $Id: sfGuardRememberKeyForm.class.php 7745 2008-03-05 11:05:33Z fabien $
6.9 */
6.10 class sfGuardRememberKeyForm extends BasesfGuardRememberKeyForm
6.11 {
7.1 --- a/plugins/sfGuardPlugin/lib/form/sfGuardUserForm.class.php Fri Jul 08 00:33:03 2011 +0200
7.2 +++ b/plugins/sfGuardPlugin/lib/form/sfGuardUserForm.class.php Fri Jul 08 00:40:34 2011 +0200
7.3 @@ -5,13 +5,10 @@
7.4 *
7.5 * @package form
7.6 * @subpackage sf_guard_user
7.7 - * @version SVN: $Id: sfGuardUserForm.class.php 13001 2008-11-14 10:45:32Z noel $
7.8 + * @version SVN: $Id: sfGuardUserForm.class.php 24560 2009-11-30 11:05:31Z fabien $
7.9 */
7.10 class sfGuardUserForm extends sfGuardUserAdminForm
7.11 {
7.12 - protected
7.13 - $pkName = null;
7.14 -
7.15 public function configure()
7.16 {
7.17 parent::configure();
8.1 --- a/plugins/sfGuardPlugin/lib/form/sfGuardUserGroupForm.class.php Fri Jul 08 00:33:03 2011 +0200
8.2 +++ b/plugins/sfGuardPlugin/lib/form/sfGuardUserGroupForm.class.php Fri Jul 08 00:40:34 2011 +0200
8.3 @@ -5,7 +5,7 @@
8.4 *
8.5 * @package form
8.6 * @subpackage sf_guard_user_group
8.7 - * @version SVN: $Id: sfGuardUserGroupForm.class.php 9999 2008-06-29 21:24:44Z fabien $
8.8 + * @version SVN: $Id: sfGuardUserGroupForm.class.php 7745 2008-03-05 11:05:33Z fabien $
8.9 */
8.10 class sfGuardUserGroupForm extends BasesfGuardUserGroupForm
8.11 {
9.1 --- a/plugins/sfGuardPlugin/lib/form/sfGuardUserPermissionForm.class.php Fri Jul 08 00:33:03 2011 +0200
9.2 +++ b/plugins/sfGuardPlugin/lib/form/sfGuardUserPermissionForm.class.php Fri Jul 08 00:40:34 2011 +0200
9.3 @@ -5,7 +5,7 @@
9.4 *
9.5 * @package form
9.6 * @subpackage sf_guard_user_permission
9.7 - * @version SVN: $Id: sfGuardUserPermissionForm.class.php 9999 2008-06-29 21:24:44Z fabien $
9.8 + * @version SVN: $Id: sfGuardUserPermissionForm.class.php 7745 2008-03-05 11:05:33Z fabien $
9.9 */
9.10 class sfGuardUserPermissionForm extends BasesfGuardUserPermissionForm
9.11 {
10.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardGroup.php Fri Jul 08 00:33:03 2011 +0200
10.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardGroup.php Fri Jul 08 00:40:34 2011 +0200
10.3 @@ -13,7 +13,7 @@
10.4 * @package symfony
10.5 * @subpackage plugin
10.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
10.7 - * @version SVN: $Id: PluginsfGuardGroup.php 9999 2008-06-29 21:24:44Z fabien $
10.8 + * @version SVN: $Id: PluginsfGuardGroup.php 7634 2008-02-27 18:01:40Z fabien $
10.9 */
10.10 class PluginsfGuardGroup extends BasesfGuardGroup
10.11 {
11.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardGroupPermission.php Fri Jul 08 00:33:03 2011 +0200
11.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardGroupPermission.php Fri Jul 08 00:40:34 2011 +0200
11.3 @@ -13,7 +13,7 @@
11.4 * @package symfony
11.5 * @subpackage plugin
11.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
11.7 - * @version SVN: $Id: PluginsfGuardGroupPermission.php 9999 2008-06-29 21:24:44Z fabien $
11.8 + * @version SVN: $Id: PluginsfGuardGroupPermission.php 7634 2008-02-27 18:01:40Z fabien $
11.9 */
11.10 class PluginsfGuardGroupPermission extends BasesfGuardGroupPermission
11.11 {
12.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardGroupPermissionPeer.php Fri Jul 08 00:33:03 2011 +0200
12.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardGroupPermissionPeer.php Fri Jul 08 00:40:34 2011 +0200
12.3 @@ -13,7 +13,7 @@
12.4 * @package symfony
12.5 * @subpackage plugin
12.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
12.7 - * @version SVN: $Id: PluginsfGuardGroupPermissionPeer.php 9999 2008-06-29 21:24:44Z fabien $
12.8 + * @version SVN: $Id: PluginsfGuardGroupPermissionPeer.php 7634 2008-02-27 18:01:40Z fabien $
12.9 */
12.10 class PluginsfGuardGroupPermissionPeer extends BasesfGuardGroupPermissionPeer
12.11 {
13.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardPermission.php Fri Jul 08 00:33:03 2011 +0200
13.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardPermission.php Fri Jul 08 00:40:34 2011 +0200
13.3 @@ -13,7 +13,7 @@
13.4 * @package symfony
13.5 * @subpackage plugin
13.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
13.7 - * @version SVN: $Id: PluginsfGuardPermission.php 9999 2008-06-29 21:24:44Z fabien $
13.8 + * @version SVN: $Id: PluginsfGuardPermission.php 7634 2008-02-27 18:01:40Z fabien $
13.9 */
13.10 class PluginsfGuardPermission extends BasesfGuardPermission
13.11 {
14.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardPermissionPeer.php Fri Jul 08 00:33:03 2011 +0200
14.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardPermissionPeer.php Fri Jul 08 00:40:34 2011 +0200
14.3 @@ -13,7 +13,7 @@
14.4 * @package symfony
14.5 * @subpackage plugin
14.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
14.7 - * @version SVN: $Id: PluginsfGuardPermissionPeer.php 9999 2008-06-29 21:24:44Z fabien $
14.8 + * @version SVN: $Id: PluginsfGuardPermissionPeer.php 7634 2008-02-27 18:01:40Z fabien $
14.9 */
14.10 class PluginsfGuardPermissionPeer extends BasesfGuardPermissionPeer
14.11 {
15.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardRememberKey.php Fri Jul 08 00:33:03 2011 +0200
15.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardRememberKey.php Fri Jul 08 00:40:34 2011 +0200
15.3 @@ -13,7 +13,7 @@
15.4 * @package symfony
15.5 * @subpackage plugin
15.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
15.7 - * @version SVN: $Id: PluginsfGuardRememberKey.php 9999 2008-06-29 21:24:44Z fabien $
15.8 + * @version SVN: $Id: PluginsfGuardRememberKey.php 7634 2008-02-27 18:01:40Z fabien $
15.9 */
15.10 class PluginsfGuardRememberKey extends BasesfGuardRememberKey
15.11 {
16.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardRememberKeyPeer.php Fri Jul 08 00:33:03 2011 +0200
16.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardRememberKeyPeer.php Fri Jul 08 00:40:34 2011 +0200
16.3 @@ -13,7 +13,7 @@
16.4 * @package symfony
16.5 * @subpackage plugin
16.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
16.7 - * @version SVN: $Id: PluginsfGuardRememberKeyPeer.php 9999 2008-06-29 21:24:44Z fabien $
16.8 + * @version SVN: $Id: PluginsfGuardRememberKeyPeer.php 7634 2008-02-27 18:01:40Z fabien $
16.9 */
16.10 class PluginsfGuardRememberKeyPeer extends BasesfGuardRememberKeyPeer
16.11 {
17.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserGroupPeer.php Fri Jul 08 00:33:03 2011 +0200
17.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserGroupPeer.php Fri Jul 08 00:40:34 2011 +0200
17.3 @@ -13,7 +13,7 @@
17.4 * @package symfony
17.5 * @subpackage plugin
17.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
17.7 - * @version SVN: $Id: PluginsfGuardUserGroupPeer.php 9999 2008-06-29 21:24:44Z fabien $
17.8 + * @version SVN: $Id: PluginsfGuardUserGroupPeer.php 7634 2008-02-27 18:01:40Z fabien $
17.9 */
17.10 class PluginsfGuardUserGroupPeer extends BasesfGuardUserGroupPeer
17.11 {
18.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserPeer.php Fri Jul 08 00:33:03 2011 +0200
18.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserPeer.php Fri Jul 08 00:40:34 2011 +0200
18.3 @@ -13,7 +13,7 @@
18.4 * @package symfony
18.5 * @subpackage plugin
18.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
18.7 - * @version SVN: $Id: PluginsfGuardUserPeer.php 9999 2008-06-29 21:24:44Z fabien $
18.8 + * @version SVN: $Id: PluginsfGuardUserPeer.php 7634 2008-02-27 18:01:40Z fabien $
18.9 */
18.10 class PluginsfGuardUserPeer extends BasesfGuardUserPeer
18.11 {
19.1 --- a/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserPermissionPeer.php Fri Jul 08 00:33:03 2011 +0200
19.2 +++ b/plugins/sfGuardPlugin/lib/model/plugin/PluginsfGuardUserPermissionPeer.php Fri Jul 08 00:40:34 2011 +0200
19.3 @@ -13,7 +13,7 @@
19.4 * @package symfony
19.5 * @subpackage plugin
19.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
19.7 - * @version SVN: $Id: PluginsfGuardUserPermissionPeer.php 9999 2008-06-29 21:24:44Z fabien $
19.8 + * @version SVN: $Id: PluginsfGuardUserPermissionPeer.php 7634 2008-02-27 18:01:40Z fabien $
19.9 */
19.10 class PluginsfGuardUserPermissionPeer extends BasesfGuardUserPermissionPeer
19.11 {
20.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardGroup.php Fri Jul 08 00:33:03 2011 +0200
20.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardGroup.php Fri Jul 08 00:40:34 2011 +0200
20.3 @@ -13,7 +13,7 @@
20.4 * @package symfony
20.5 * @subpackage plugin
20.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
20.7 - * @version SVN: $Id: sfGuardGroup.php 9999 2008-06-29 21:24:44Z fabien $
20.8 + * @version SVN: $Id: sfGuardGroup.php 7634 2008-02-27 18:01:40Z fabien $
20.9 */
20.10 class sfGuardGroup extends PluginsfGuardGroup
20.11 {
21.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardGroupPeer.php Fri Jul 08 00:33:03 2011 +0200
21.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardGroupPeer.php Fri Jul 08 00:40:34 2011 +0200
21.3 @@ -13,7 +13,7 @@
21.4 * @package symfony
21.5 * @subpackage plugin
21.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
21.7 - * @version SVN: $Id: sfGuardGroupPeer.php 9999 2008-06-29 21:24:44Z fabien $
21.8 + * @version SVN: $Id: sfGuardGroupPeer.php 7634 2008-02-27 18:01:40Z fabien $
21.9 */
21.10 class sfGuardGroupPeer extends PluginsfGuardGroupPeer
21.11 {
22.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardGroupPermission.php Fri Jul 08 00:33:03 2011 +0200
22.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardGroupPermission.php Fri Jul 08 00:40:34 2011 +0200
22.3 @@ -13,7 +13,7 @@
22.4 * @package symfony
22.5 * @subpackage plugin
22.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
22.7 - * @version SVN: $Id: sfGuardGroupPermission.php 9999 2008-06-29 21:24:44Z fabien $
22.8 + * @version SVN: $Id: sfGuardGroupPermission.php 7634 2008-02-27 18:01:40Z fabien $
22.9 */
22.10 class sfGuardGroupPermission extends PluginsfGuardGroupPermission
22.11 {
23.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardGroupPermissionPeer.php Fri Jul 08 00:33:03 2011 +0200
23.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardGroupPermissionPeer.php Fri Jul 08 00:40:34 2011 +0200
23.3 @@ -13,7 +13,7 @@
23.4 * @package symfony
23.5 * @subpackage plugin
23.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
23.7 - * @version SVN: $Id: sfGuardGroupPermissionPeer.php 9999 2008-06-29 21:24:44Z fabien $
23.8 + * @version SVN: $Id: sfGuardGroupPermissionPeer.php 7634 2008-02-27 18:01:40Z fabien $
23.9 */
23.10 class sfGuardGroupPermissionPeer extends PluginsfGuardGroupPermissionPeer
23.11 {
24.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardPermission.php Fri Jul 08 00:33:03 2011 +0200
24.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardPermission.php Fri Jul 08 00:40:34 2011 +0200
24.3 @@ -13,7 +13,7 @@
24.4 * @package symfony
24.5 * @subpackage plugin
24.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
24.7 - * @version SVN: $Id: sfGuardPermission.php 9999 2008-06-29 21:24:44Z fabien $
24.8 + * @version SVN: $Id: sfGuardPermission.php 7634 2008-02-27 18:01:40Z fabien $
24.9 */
24.10 class sfGuardPermission extends PluginsfGuardPermission
24.11 {
25.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardPermissionPeer.php Fri Jul 08 00:33:03 2011 +0200
25.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardPermissionPeer.php Fri Jul 08 00:40:34 2011 +0200
25.3 @@ -13,7 +13,7 @@
25.4 * @package symfony
25.5 * @subpackage plugin
25.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
25.7 - * @version SVN: $Id: sfGuardPermissionPeer.php 9999 2008-06-29 21:24:44Z fabien $
25.8 + * @version SVN: $Id: sfGuardPermissionPeer.php 7634 2008-02-27 18:01:40Z fabien $
25.9 */
25.10 class sfGuardPermissionPeer extends PluginsfGuardPermissionPeer
25.11 {
26.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardRememberKey.php Fri Jul 08 00:33:03 2011 +0200
26.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardRememberKey.php Fri Jul 08 00:40:34 2011 +0200
26.3 @@ -13,7 +13,7 @@
26.4 * @package symfony
26.5 * @subpackage plugin
26.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
26.7 - * @version SVN: $Id: sfGuardRememberKey.php 9999 2008-06-29 21:24:44Z fabien $
26.8 + * @version SVN: $Id: sfGuardRememberKey.php 7634 2008-02-27 18:01:40Z fabien $
26.9 */
26.10 class sfGuardRememberKey extends PluginsfGuardRememberKey
26.11 {
27.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardRememberKeyPeer.php Fri Jul 08 00:33:03 2011 +0200
27.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardRememberKeyPeer.php Fri Jul 08 00:40:34 2011 +0200
27.3 @@ -13,7 +13,7 @@
27.4 * @package symfony
27.5 * @subpackage plugin
27.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
27.7 - * @version SVN: $Id: sfGuardRememberKeyPeer.php 9999 2008-06-29 21:24:44Z fabien $
27.8 + * @version SVN: $Id: sfGuardRememberKeyPeer.php 7634 2008-02-27 18:01:40Z fabien $
27.9 */
27.10 class sfGuardRememberKeyPeer extends PluginsfGuardRememberKeyPeer
27.11 {
28.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardUser.php Fri Jul 08 00:33:03 2011 +0200
28.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardUser.php Fri Jul 08 00:40:34 2011 +0200
28.3 @@ -13,7 +13,7 @@
28.4 * @package symfony
28.5 * @subpackage plugin
28.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
28.7 - * @version SVN: $Id: sfGuardUser.php 9999 2008-06-29 21:24:44Z fabien $
28.8 + * @version SVN: $Id: sfGuardUser.php 7634 2008-02-27 18:01:40Z fabien $
28.9 */
28.10 class sfGuardUser extends PluginsfGuardUser
28.11 {
29.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardUserGroup.php Fri Jul 08 00:33:03 2011 +0200
29.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardUserGroup.php Fri Jul 08 00:40:34 2011 +0200
29.3 @@ -13,7 +13,7 @@
29.4 * @package symfony
29.5 * @subpackage plugin
29.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
29.7 - * @version SVN: $Id: sfGuardUserGroup.php 9999 2008-06-29 21:24:44Z fabien $
29.8 + * @version SVN: $Id: sfGuardUserGroup.php 7634 2008-02-27 18:01:40Z fabien $
29.9 */
29.10 class sfGuardUserGroup extends PluginsfGuardUserGroup
29.11 {
30.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardUserGroupPeer.php Fri Jul 08 00:33:03 2011 +0200
30.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardUserGroupPeer.php Fri Jul 08 00:40:34 2011 +0200
30.3 @@ -13,7 +13,7 @@
30.4 * @package symfony
30.5 * @subpackage plugin
30.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
30.7 - * @version SVN: $Id: sfGuardUserGroupPeer.php 9999 2008-06-29 21:24:44Z fabien $
30.8 + * @version SVN: $Id: sfGuardUserGroupPeer.php 7634 2008-02-27 18:01:40Z fabien $
30.9 */
30.10 class sfGuardUserGroupPeer extends PluginsfGuardUserGroupPeer
30.11 {
31.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardUserPeer.php Fri Jul 08 00:33:03 2011 +0200
31.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardUserPeer.php Fri Jul 08 00:40:34 2011 +0200
31.3 @@ -13,7 +13,7 @@
31.4 * @package symfony
31.5 * @subpackage plugin
31.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
31.7 - * @version SVN: $Id: sfGuardUserPeer.php 9999 2008-06-29 21:24:44Z fabien $
31.8 + * @version SVN: $Id: sfGuardUserPeer.php 7634 2008-02-27 18:01:40Z fabien $
31.9 */
31.10 class sfGuardUserPeer extends PluginsfGuardUserPeer
31.11 {
32.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardUserPermission.php Fri Jul 08 00:33:03 2011 +0200
32.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardUserPermission.php Fri Jul 08 00:40:34 2011 +0200
32.3 @@ -13,7 +13,7 @@
32.4 * @package symfony
32.5 * @subpackage plugin
32.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
32.7 - * @version SVN: $Id: sfGuardUserPermission.php 9999 2008-06-29 21:24:44Z fabien $
32.8 + * @version SVN: $Id: sfGuardUserPermission.php 7634 2008-02-27 18:01:40Z fabien $
32.9 */
32.10 class sfGuardUserPermission extends PluginsfGuardUserPermission
32.11 {
33.1 --- a/plugins/sfGuardPlugin/lib/model/sfGuardUserPermissionPeer.php Fri Jul 08 00:33:03 2011 +0200
33.2 +++ b/plugins/sfGuardPlugin/lib/model/sfGuardUserPermissionPeer.php Fri Jul 08 00:40:34 2011 +0200
33.3 @@ -13,7 +13,7 @@
33.4 * @package symfony
33.5 * @subpackage plugin
33.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
33.7 - * @version SVN: $Id: sfGuardUserPermissionPeer.php 9999 2008-06-29 21:24:44Z fabien $
33.8 + * @version SVN: $Id: sfGuardUserPermissionPeer.php 7634 2008-02-27 18:01:40Z fabien $
33.9 */
33.10 class sfGuardUserPermissionPeer extends PluginsfGuardUserPermissionPeer
33.11 {
34.1 --- a/plugins/sfGuardPlugin/lib/sfGuardBasicSecurityFilter.class.php Fri Jul 08 00:33:03 2011 +0200
34.2 +++ b/plugins/sfGuardPlugin/lib/sfGuardBasicSecurityFilter.class.php Fri Jul 08 00:40:34 2011 +0200
34.3 @@ -2,33 +2,48 @@
34.4
34.5 /*
34.6 * This file is part of the symfony package.
34.7 - * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
34.8 + * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
34.9 *
34.10 * For the full copyright and license information, please view the LICENSE
34.11 * file that was distributed with this source code.
34.12 */
34.13
34.14 /**
34.15 - *
34.16 + * Processes the "remember me" cookie.
34.17 + *
34.18 * @package symfony
34.19 * @subpackage plugin
34.20 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
34.21 - * @version SVN: $Id: sfGuardBasicSecurityFilter.class.php 9999 2008-06-29 21:24:44Z fabien $
34.22 + * @version SVN: $Id: sfGuardBasicSecurityFilter.class.php 15757 2009-02-24 21:15:40Z Kris.Wallsmith $
34.23 + *
34.24 + * @deprecated Use {@link sfGuardRememberMeFilter} instead
34.25 */
34.26 class sfGuardBasicSecurityFilter extends sfBasicSecurityFilter
34.27 {
34.28 - public function execute ($filterChain)
34.29 + /**
34.30 + * @see sfFilter
34.31 + */
34.32 + public function execute($filterChain)
34.33 {
34.34 - if ($this->isFirstCall() and !$this->getContext()->getUser()->isAuthenticated())
34.35 + $cookieName = sfConfig::get('app_sf_guard_plugin_remember_cookie_name', 'sfRemember');
34.36 +
34.37 + if ($this->isFirstCall())
34.38 {
34.39 - if ($cookie = $this->getContext()->getRequest()->getCookie(sfConfig::get('app_sf_guard_plugin_remember_cookie_name', 'sfRemember')))
34.40 + // deprecated notice
34.41 + $this->context->getEventDispatcher()->notify(new sfEvent($this, 'application.log', array(sprintf('The filter "%s" is deprecated. Use "sfGuardRememberMeFilter" instead.', __CLASS__), 'priority' => sfLogger::NOTICE)));
34.42 +
34.43 + if (
34.44 + $this->context->getUser()->isAnonymous()
34.45 + &&
34.46 + $cookie = $this->context->getRequest()->getCookie($cookieName)
34.47 + )
34.48 {
34.49 - $c = new Criteria();
34.50 - $c->add(sfGuardRememberKeyPeer::REMEMBER_KEY, $cookie);
34.51 - $rk = sfGuardRememberKeyPeer::doSelectOne($c);
34.52 - if ($rk && $rk->getSfGuardUser())
34.53 + $criteria = new Criteria();
34.54 + $criteria->add(sfGuardRememberKeyPeer::REMEMBER_KEY, $cookie);
34.55 +
34.56 + if ($rk = sfGuardRememberKeyPeer::doSelectOne($criteria))
34.57 {
34.58 - $this->getContext()->getUser()->signIn($rk->getSfGuardUser());
34.59 + $this->context->getUser()->signIn($rk->getsfGuardUser());
34.60 }
34.61 }
34.62 }
35.1 --- a/plugins/sfGuardPlugin/lib/sfGuardRouting.class.php Fri Jul 08 00:33:03 2011 +0200
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,70 +0,0 @@
35.4 -<?php
35.5 -
35.6 -/*
35.7 - * This file is part of the symfony package.
35.8 - * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
35.9 - *
35.10 - * For the full copyright and license information, please view the LICENSE
35.11 - * file that was distributed with this source code.
35.12 - */
35.13 -
35.14 -/**
35.15 - *
35.16 - * @package symfony
35.17 - * @subpackage plugin
35.18 - * @author Fabien Potencier <fabien.potencier@symfony-project.com>
35.19 - * @version SVN: $Id: sfGuardRouting.class.php 13346 2008-11-25 19:10:17Z FabianLange $
35.20 - */
35.21 -class sfGuardRouting
35.22 -{
35.23 - /**
35.24 - * Listens to the routing.load_configuration event.
35.25 - *
35.26 - * @param sfEvent An sfEvent instance
35.27 - */
35.28 - static public function listenToRoutingLoadConfigurationEvent(sfEvent $event)
35.29 - {
35.30 - $r = $event->getSubject();
35.31 -
35.32 - // preprend our routes
35.33 - $r->prependRoute('sf_guard_signin', new sfRoute('/login', array('module' => 'sfGuardAuth', 'action' => 'signin')));
35.34 - $r->prependRoute('sf_guard_signout', new sfRoute('/logout', array('module' => 'sfGuardAuth', 'action' => 'signout')));
35.35 - $r->prependRoute('sf_guard_password', new sfRoute('/request_password', array('module' => 'sfGuardAuth', 'action' => 'password')));
35.36 - }
35.37 -
35.38 - static public function addRouteForAdminUser(sfEvent $event)
35.39 - {
35.40 - $event->getSubject()->prependRoute('sf_guard_user', new sfPropelRouteCollection(array(
35.41 - 'name' => 'sf_guard_user',
35.42 - 'model' => 'sfGuardUser',
35.43 - 'module' => 'sfGuardUser',
35.44 - 'prefix_path' => 'sf_guard_user',
35.45 - 'with_wildcard_routes' => true,
35.46 - 'requirements' => array(),
35.47 - )));
35.48 - }
35.49 -
35.50 - static public function addRouteForAdminGroup(sfEvent $event)
35.51 - {
35.52 - $event->getSubject()->prependRoute('sf_guard_group', new sfPropelRouteCollection(array(
35.53 - 'name' => 'sf_guard_group',
35.54 - 'model' => 'sfGuardGroup',
35.55 - 'module' => 'sfGuardGroup',
35.56 - 'prefix_path' => 'sf_guard_group',
35.57 - 'with_wildcard_routes' => true,
35.58 - 'requirements' => array(),
35.59 - )));
35.60 - }
35.61 -
35.62 - static public function addRouteForAdminPermission(sfEvent $event)
35.63 - {
35.64 - $event->getSubject()->prependRoute('sf_guard_permission', new sfPropelRouteCollection(array(
35.65 - 'name' => 'sf_guard_permission',
35.66 - 'model' => 'sfGuardPermission',
35.67 - 'module' => 'sfGuardPermission',
35.68 - 'prefix_path' => 'sf_guard_permission',
35.69 - 'with_wildcard_routes' => true,
35.70 - 'requirements' => array(),
35.71 - )));
35.72 - }
35.73 -}
36.1 --- a/plugins/sfGuardPlugin/lib/user/sfGuardSecurityUser.class.php Fri Jul 08 00:33:03 2011 +0200
36.2 +++ b/plugins/sfGuardPlugin/lib/user/sfGuardSecurityUser.class.php Fri Jul 08 00:40:34 2011 +0200
36.3 @@ -13,7 +13,7 @@
36.4 * @package symfony
36.5 * @subpackage plugin
36.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
36.7 - * @version SVN: $Id: sfGuardSecurityUser.class.php 12075 2008-10-08 16:15:03Z noel $
36.8 + * @version SVN: $Id: sfGuardSecurityUser.class.php 30260 2010-07-16 13:55:09Z fabien $
36.9 */
36.10 class sfGuardSecurityUser extends sfBasicSecurityUser
36.11 {
36.12 @@ -47,6 +47,11 @@
36.13
36.14 public function hasCredential($credential, $useAnd = true)
36.15 {
36.16 + if (empty($credential))
36.17 + {
36.18 + return true;
36.19 + }
36.20 +
36.21 if (!$this->getGuardUser())
36.22 {
36.23 return false;
36.24 @@ -89,12 +94,12 @@
36.25 $c = new Criteria();
36.26 $expiration_age = sfConfig::get('app_sf_guard_plugin_remember_key_expiration_age', 15 * 24 * 3600);
36.27 $c->add(sfGuardRememberKeyPeer::CREATED_AT, time() - $expiration_age, Criteria::LESS_THAN);
36.28 - sfGuardRememberKeyPeer::doDelete($c);
36.29 + sfGuardRememberKeyPeer::doDelete($c, $con);
36.30
36.31 // remove other keys from this user
36.32 $c = new Criteria();
36.33 $c->add(sfGuardRememberKeyPeer::USER_ID, $user->getId());
36.34 - sfGuardRememberKeyPeer::doDelete($c);
36.35 + sfGuardRememberKeyPeer::doDelete($c, $con);
36.36
36.37 // generate new keys
36.38 $key = $this->generateRandomKey();
36.39 @@ -114,14 +119,7 @@
36.40
36.41 protected function generateRandomKey($len = 20)
36.42 {
36.43 - $string = '';
36.44 - $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
36.45 - for ($i = 1; $i <= $len; $i++)
36.46 - {
36.47 - $string .= substr($pool, rand(0, 61), 1);
36.48 - }
36.49 -
36.50 - return md5($string);
36.51 + return base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);
36.52 }
36.53
36.54 public function signOut()
37.1 --- a/plugins/sfGuardPlugin/lib/validator/sfGuardValidatorUser.class.php Fri Jul 08 00:33:03 2011 +0200
37.2 +++ b/plugins/sfGuardPlugin/lib/validator/sfGuardValidatorUser.class.php Fri Jul 08 00:40:34 2011 +0200
37.3 @@ -9,45 +9,67 @@
37.4 */
37.5
37.6 /**
37.7 - *
37.8 + * Validates a user login.
37.9 + *
37.10 * @package symfony
37.11 * @subpackage plugin
37.12 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
37.13 - * @version SVN: $Id: sfGuardValidatorUser.class.php 12075 2008-10-08 16:15:03Z noel $
37.14 + * @version SVN: $Id: sfGuardValidatorUser.class.php 30261 2010-07-16 14:06:36Z fabien $
37.15 */
37.16 class sfGuardValidatorUser extends sfValidatorBase
37.17 {
37.18 + /**
37.19 + * Configures the user validator.
37.20 + *
37.21 + * Available options:
37.22 + *
37.23 + * * username_field Field name of username field (username by default)
37.24 + * * password_field Field name of password field (password by default)
37.25 + * * throw_global_error Throws a global error if true (false by default)
37.26 + *
37.27 + * @see sfValidatorBase
37.28 + */
37.29 public function configure($options = array(), $messages = array())
37.30 {
37.31 $this->addOption('username_field', 'username');
37.32 $this->addOption('password_field', 'password');
37.33 - $this->addOption('rememeber_checkbox', 'remember');
37.34 $this->addOption('throw_global_error', false);
37.35
37.36 $this->setMessage('invalid', 'The username and/or password is invalid.');
37.37 }
37.38
37.39 + /**
37.40 + * @see sfValidatorBase
37.41 + */
37.42 protected function doClean($values)
37.43 {
37.44 - $username = isset($values[$this->getOption('username_field')]) ? $values[$this->getOption('username_field')] : '';
37.45 - $password = isset($values[$this->getOption('password_field')]) ? $values[$this->getOption('password_field')] : '';
37.46 - $remember = isset($values[$this->getOption('rememeber_checkbox')]) ? $values[$this->getOption('rememeber_checkbox')] : '';
37.47 + // only validate if username and password are both present
37.48 + if (isset($values[$this->getOption('username_field')]) && isset($values[$this->getOption('password_field')]))
37.49 + {
37.50 + $username = $values[$this->getOption('username_field')];
37.51 + $password = $values[$this->getOption('password_field')];
37.52
37.53 - // user exists?
37.54 - if ($user = sfGuardUserPeer::retrieveByUsername($username))
37.55 - {
37.56 - // password is ok?
37.57 - if ($user->checkPassword($password))
37.58 + // user exists?
37.59 + if ($user = sfGuardUserPeer::retrieveByUsername($username))
37.60 {
37.61 - return array_merge($values, array('user' => $user));
37.62 + // password is ok?
37.63 + if ($user->getIsActive() && $user->checkPassword($password))
37.64 + {
37.65 + return array_merge($values, array('user' => $user));
37.66 + }
37.67 }
37.68 +
37.69 + if ($this->getOption('throw_global_error'))
37.70 + {
37.71 + throw new sfValidatorError($this, 'invalid');
37.72 + }
37.73 +
37.74 + throw new sfValidatorErrorSchema($this, array(
37.75 + $this->getOption('username_field') => new sfValidatorError($this, 'invalid'),
37.76 + ));
37.77 }
37.78
37.79 - if ($this->getOption('throw_global_error'))
37.80 - {
37.81 - throw new sfValidatorError($this, 'invalid');
37.82 - }
37.83 -
37.84 - throw new sfValidatorErrorSchema($this, array($this->getOption('username_field') => new sfValidatorError($this, 'invalid')));
37.85 + // assume a required error has already been thrown, skip validation
37.86 + return $values;
37.87 }
37.88 }
38.1 --- a/plugins/sfGuardPlugin/modules/sfGuardAuth/actions/actions.class.php Fri Jul 08 00:33:03 2011 +0200
38.2 +++ b/plugins/sfGuardPlugin/modules/sfGuardAuth/actions/actions.class.php Fri Jul 08 00:40:34 2011 +0200
38.3 @@ -15,7 +15,7 @@
38.4 * @package symfony
38.5 * @subpackage plugin
38.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
38.7 - * @version SVN: $Id: actions.class.php 9999 2008-06-29 21:24:44Z fabien $
38.8 + * @version SVN: $Id: actions.class.php 7634 2008-02-27 18:01:40Z fabien $
38.9 */
38.10 class sfGuardAuthActions extends BasesfGuardAuthActions
38.11 {
39.1 --- a/plugins/sfGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php Fri Jul 08 00:33:03 2011 +0200
39.2 +++ b/plugins/sfGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php Fri Jul 08 00:40:34 2011 +0200
39.3 @@ -13,7 +13,7 @@
39.4 * @package symfony
39.5 * @subpackage plugin
39.6 * @author Fabien Potencier <fabien.potencier@symfony-project.com>
39.7 - * @version SVN: $Id: BasesfGuardAuthActions.class.php 12075 2008-10-08 16:15:03Z noel $
39.8 + * @version SVN: $Id: BasesfGuardAuthActions.class.php 19772 2009-07-01 08:41:12Z fabien $
39.9 */
39.10 class BasesfGuardAuthActions extends sfActions
39.11 {
39.12 @@ -25,6 +25,14 @@
39.13 return $this->redirect('@homepage');
39.14 }
39.15
39.16 + if ($request->isXmlHttpRequest())
39.17 + {
39.18 + $this->getResponse()->setHeaderOnly(true);
39.19 + $this->getResponse()->setStatusCode(401);
39.20 +
39.21 + return sfView::NONE;
39.22 + }
39.23 +
39.24 $class = sfConfig::get('app_sf_guard_plugin_signin_form', 'sfGuardFormSignin');
39.25 $this->form = new $class();
39.26
39.27 @@ -46,14 +54,6 @@
39.28 }
39.29 else
39.30 {
39.31 - if ($request->isXmlHttpRequest())
39.32 - {
39.33 - $this->getResponse()->setHeaderOnly(true);
39.34 - $this->getResponse()->setStatusCode(401);
39.35 -
39.36 - return sfView::NONE;
39.37 - }
39.38 -
39.39 // if we have been forwarded, then the referer is the current URL
39.40 // if not, this is the referer of the current request
39.41 $user->setReferer($this->getContext()->getActionStack()->getSize() > 1 ? $request->getUri() : $request->getReferer());