Hello!
i dont know if i don't understand the pluggin or if it has a bug or what...
the problem i have is that i have a loged user, and if he press a button, i
call an action wich adds a new group to the user. I do this as follow:
if(!$user->hasGroup("client"))
$user->addGroupByName("client");
the problem is that all the credentials (permissions) associated with that
new group, aren't effective until my user logsOut and logs in again. I've
tried the following code to try to refresh the credentials.
$this->getUser()->addCredentials($this->getUser()->getAllPermissionNames());
and
$this->getUser()->clearCredentials();
$this->getUser()->addCredentials($this->getUser()->getAllPermissionNames());
even i tried
$this->getUser()->clearCredentials();
$this->getUser()->addCredentials($this->getUser()->getAllPermissionNames());
$this->getUser()->initialize($this->getUser()->getContext());
but nothing, i can't access to other actions wich are secured via the
security.yml file of the module because the user needs the new credentials
that come with that new group i added to the user.
am I doing something wrong?
thank you very much.
--
- Oriol Mercadé Figueras
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" 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-devs?hl=en
-~----------~----~----~----~------~----~------~--~---