Edgewall Software

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


Ignore:
Timestamp:
Sep 24, 2017, 2:16:24 PM (4 years ago)
Author:
Ryan J Ollos

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12915, comment 4

    v2 v3  
    33I can see how the logic is similar to [browser:tags/trac-1.2.2/trac/perm.py#L179 DefaultPermissionStore.get_user_permissions]. `subjects`, as calculated in that method, is the set of permission groups possessed by the user. We could just copy/paste and modify that method: [4e719b32d/rjollos.git].
    44
    5 However, another thing to consider is that `DefaultPermissionStore` is really storing permission groups, so maybe it should implement `IPermissionGroupProvider`: [bf3fe0818/rjollos.git].
     5However, another thing to consider is that `DefaultPermissionStore` is storing permission groups, so maybe it should implement `IPermissionGroupProvider`: [bf3fe0818/rjollos.git].
    66
    77In r16314 I fixed the docstring for `DefaultPermissionStore.get_user_permissions`. The docstring for `IPermissionStore.get_user_permissions` is either incorrect, or `DefaultPermissionStore.get_user_permissions` is [browser:tags/trac-1.3.2/trac/perm.py@:95-97#L87 incorrectly implementing the interface]. The interface claims a dictionary is returned, but `DefaultPermissionStore` returns a list.