Hi,

 

I'm under the understanding that:

 

 - users can belong to many groups.

 - users can have many permissions.

 - groups can have many permissions.

 - users within groups have permissions associated to that group.

 

Example:

 

User

                Group

                                Permission X

                Permission Y

                

This user would have X & Y permissions.

 

Here are my results:

 

                $sf_user->hasPermission('X'); // returns FALSE

                $sf_user->hasPermission('Y'); // returns TRUE

                

                $sf_user->getAllPermissionNames(); // returns array(X,Y)

                

After looking at the code, when you execute hasPermission for the first time
it loads up user permissions only.

When you execute getAllPermissionNames, it also includes the group
permissions.

 

Is this as expected?

 

 

Thanks

Alex Joyce


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