authz system does not expand actions
|Reported by:||Owned by:||Remy Blank|
While writing my own authz system, I need to fix some issues. One was ticket #6644, and the other issue is that the permissions are not expanded. This means that granting the TRAC_ADMIN permission does not have any effect.
The reason for this is that the call to PermissionSystem.expand_actions happens with an iterator object. However PermissionSystem.expand_actions uses the actions parameter twice. The first time all the actions are taken out of the iterator, and the second time (when walking over them to expand the actions) no actions are left.
This could be fixed by either passing in a list, or by storing the actions temporarily in expand_actions.