Hy,

I have a strange issue in my code.

I need to display fields of the sfGuardAdminUserForm in my template
switch user group:
- developers can edit permissions and groups so the complete form is
displayed in the view
- editors can't edit is_super_admin, permissions and groups.

So I test in the form class if the user has the "Editor" group and
then unset the fields:

class sfGuardUserAdminForm extends BasesfGuardUserAdminForm
{
  public function configure()
  {
    parent::configure();

    $this->setDefault('is_super_admin', false);

    $user = sfContext::getInstance()->getUser()->getGuardUser();


    if($user->hasGroup('Editor'))
    {
      unset(
        $this['is_super_admin'],
        $this['groups_list'],
        $this['permissions_list']
      );
    }
...
  }
}

But this makes me a 500 error: Widget "groups_list" does not exist.

I really need help!

PS: I use the sfGuardUser module from the plugin

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to