I'm using sfGuardPlugin to manage users and permissions, but the
actual authentication is being handled through Shibboleth using
sfShibbolethPlugin. Because of this, I don't really have any need for
the password field in the sfGuardUser module. I have tried extending
the sfGuardUser module's form class and generator.yml:
plugins/sfGuardPlugin/modules/sfGuardUser/config/generator.yml:
form:
class: sfGuardUserAdminForm
display:
"NONE": [username, password,
password_again]
apps/backend/modules/sfGuardUser/config/generator.yml:
form:
class: sfShibbolethUserAdminForm
display:
"NONE": [username]
plugins/sfShibbolethPlugin/lib/sfShibbolethUserAdminForm.class.php:
public function configure()
{
parent::configure();
unset(
$this['password'],
$this['password_again']
);
}
I get an exception from sfGuardUser telling me that the password field
doesn't exist in the form. The generator is using the Shibboleth form
class, but it's still seeing for the password fields from the parent
generator. Their absence in the extended generator.yml doesn't
actually remove them. I seem to remember reading about this issue a
few times before.
I don't like the idea of extending the sfGuardUser's generated
templates for this purpose, so instead I have added an
sfShibbolethUser module to sfShibbolethPlugin that has its own admin
generator for the sfGuardUser model. This works just fine and it
doesn't feel like I'm duplicating too much from sfGuardUser since it's
all built on the admin generator anyway. Still, I wanted to float this
idea up here and make sure I'm approaching this correctly. Is there a
more efficient way out there?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---