Changes between Initial Version and Version 1 of Ticket #12915, comment 1
- Timestamp:
- Sep 21, 2017, 10:09:35 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12915, comment 1
initial v1 3 3 Some things to consider: 4 4 * [browser:tags/trac-1.3.2/trac/perm.py@:443-444#L440 get_user_permissions] is similarly named, but returns a dictionary. I have never understood the usefulness of mapping all the keys to `True`, so I chose to return a sorted list from `get_user_groups`. 5 * `get_user_permissions` returns all permissions when `username` is `None`. The same can't easily be done for `get_user_permissions` because `IPermissionGroupProvider`s don't return all groups when `username` is `None`. I'm not even sure we'd want that behavior for [browser:tags/trac-1.3.2/trac/perm.py@:274-278#L265 DefaultPermissionGroupProvider]. We'd probably need to add a `get_all_groups` method .5 * `get_user_permissions` returns all permissions when `username` is `None`. The same can't easily be done for `get_user_permissions` because `IPermissionGroupProvider`s don't return all groups when `username` is `None`. I'm not even sure we'd want that behavior for [browser:tags/trac-1.3.2/trac/perm.py@:274-278#L265 DefaultPermissionGroupProvider]. We'd probably need to add a `get_all_groups` method to the `IPermissionGroupProvider` interface. 6 6 * [browser:/tags/trac-1.3.2/trac/perm.py#L413 get_groups_dict] doesn't really return all groups, because it doesn't account for `IPermissionGroupProvider`s. We'd probably need the `DefaultPermissionGroupProvider.get_all_groups` method for it to return all groups. This could be considered a defect in [browser:tags/trac-1.3.2/trac/ticket/default_workflow.py@:539,551#L534 group expansion] of the `set_owner` field. 7 7