#40 Missing results in user report

closed-fixed
nobody
None
5
2012-10-25
2012-10-25
GlennGould
No

Hi Thomas,

looks like there's (at least ;-)) one bug in rep_show_user.php (svn r273): the report seems to get the group membership of users correctly, also the access-rights which where granted to the user directly seem look ok. However: access-rights granted by group membership are not shown at all in most cases and in some cases, they are incorrect. I think I was able to identify the source of the bug:

line 129 should be

$query .=" OR (svn_access_rights.group_id = ".$entry['group_id'].") ";

instead of
$query .=" OR (svn_access_rights.group_id = ".$entry['id'].") ";

otherwise id from the svn_users_groups tables is set, leading to incorrect and often no results at all.

Last not least (you already now my addiction to all sorts of sorting ;-) maybe line 136

"ORDER BY svnprojects.repo_id ASC, LENGTH(svn_access_rights.path) DESC";
could be replaced with
"ORDER BY svnrepos.reponame ASC, svnprojects.svnmodule ASC, svn_access_rights.path $pathSort";

and the Snippet from include/createAuthFIles for setting $pathSort should than be included at the beginning of the getAccessRightsForUser() Function for a much cleaner look of that table (as there are quiete many columns in that table, sorting via JavaScript doesn't always give a good overview).

If you decide to accept the proposed changes, find a patch attached.

Best,
Jan

Discussion

  • GlennGould
    GlennGould
    2012-10-25

     
  • Thomas Krieger
    Thomas Krieger
    2012-10-25

    patch accepted :)

     
  • Thomas Krieger
    Thomas Krieger
    2012-10-25

    • status: open --> closed-fixed