Edgewall Software

Changes between Version 2 and Version 3 of Ticket #12915, comment 1


Ignore:
Timestamp:
Apr 13, 2018, 3:33:06 AM (4 years ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12915, comment 1

    v2 v3  
    22
    331. [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`.
    4 1. `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.
     41. `get_user_permissions` returns all permissions when `username` is `None`. The same can't easily be done for `get_user_groups` 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.
    551. [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.