logo       

[symfony-users] Re: sfGuard get permission: msg#00883

symfony-users

Subject: [symfony-users] Re: sfGuard get permission

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 <shotok4n@xxxxxxxxx>

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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to symfony-users+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise