Skip to content

Commit

Permalink
call GROUPLIST_PGM before determining user_roles()...
Browse files Browse the repository at this point in the history
thanks to Stephane Chazelas [1]

[1]: https://groups.google.com/d/topic/gitolite/gy_ZkrxGSjg
  • Loading branch information
sitaramc committed Oct 4, 2012
1 parent 2dbaa4d commit 0d371ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Gitolite/Conf/Load.pm
Expand Up @@ -308,15 +308,15 @@ sub memberships {
} }
} }


push @ret, @{ ext_grouplist($base) } if $type eq 'user' and $rc{GROUPLIST_PGM};

if ( $type eq 'user' and $repo and not repo_missing($repo) ) { if ( $type eq 'user' and $repo and not repo_missing($repo) ) {
# find the roles this user has when accessing this repo and add those # find the roles this user has when accessing this repo and add those
# in as groupnames he is a member of. You need the already existing # in as groupnames he is a member of. You need the already existing
# memberships for this; see below this function for an example # memberships for this; see below this function for an example
push @ret, user_roles( $base, $repo, @ret ); push @ret, user_roles( $base, $repo, @ret );
} }


push @ret, @{ ext_grouplist($base) } if $type eq 'user' and $rc{GROUPLIST_PGM};

@ret = @{ sort_u( \@ret ) }; @ret = @{ sort_u( \@ret ) };
trace( 3, sort @ret ); trace( 3, sort @ret );
return @ret; return @ret;
Expand Down

0 comments on commit 0d371ac

Please sign in to comment.