Try hasCredential() instead of hasPermission() if you use $sf_user.
I think the latter only works for an sfGuardUser object, i.e. something like
$sf_user->getGuardUser()->hasPermission('bla')

2009/7/30 ShotoKan <shoto...@gmail.com>

>
> Hello...
>
> I have a trouble with the sfGuardPlugin: I need check if the user have
> the permission "X". I use $sf_user->hasPermission('X') but the plugin
> returns FALSE because the user don't have this permission directly...
> he have the permission through one group.
>
> For example: the user "Paul" is in the group "tester".... the group
> "tester" have the permission "X".... If i use hasPermission("X"), the
> system return FALSE.
>
> How can I solve this proble?
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to