Closed BrunoSpy closed 10 years ago
Grrr I tested it and it works :(. Can you have a look ? I may have not thought of all cases where role can be string, object...
(are we talking of v2.0 here?)
(im' using latest master, so I suppose yes we're talking about 2.0, anyway I d'ont see a 2.0 branch here)
Yes, this time I won't tag this quickly because I don't want to have the same problem as in 1.0 (where I rush the release). I think 2.0 is much much much better, but for now you need to add "minimum-stability: dev" in your composer.json, and ask for the "2.0.x-dev"
Please can you elaborate more on how you get this error? I've added a new check that can occur if you are using Doctrine collections, so any Traversable are converted to array.
Can you try against latest version please?
Thanks ! Bug fixed but ... information shown is incomplete : only direct permissions are displayed. It is a (small) regression compared to 1.0 where we had direct and "inherited" permissions avalaible in z-d-t.
Yes, I don't recursively traverse each child roles and get permissions. Actually, I think it make more sense as it is now because: if your user have admin role, and that admin role extend member role, in ZfcRbac 1.0 you would have for admin both the permissions for admin AND for member. And those for member would be repeated again. Therefore you couldn't know from which role permissions are.
I understand your point of view, but what's more important when you debug your app : to know the actual permissions of the logged in user or just those of the current role ? IMHO I would vote for the first answer.
Hi,
I realized there was a bug while writing the unit tests. If the identity role had the role "member", and that this role had a children role "guest", the ZDT only reported permissions for "member". Now, it will report permissions for member AND for all its children roles (so also all the permissions for guest).
Can you pull the latest version and tell me if it works for your use case?
I'm closing this :).
Tested and approved ! (sorry for the delay)
Version of zfc-rbac : bc7d9b3bf3