call GROUPLIST_PGM before determining user_roles()...

thanks to Stephane Chazelas [1]

[1]: https://groups.google.com/d/topic/gitolite/gy_ZkrxGSjg
redis
Sitaram Chamarty 2012-10-04 22:01:57 +05:30
parent 2dbaa4d12e
commit 0d371ac957
1 changed files with 2 additions and 2 deletions

View File

@ -308,6 +308,8 @@ 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) ) {
# 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
@ -315,8 +317,6 @@ sub memberships {
push @ret, user_roles( $base, $repo, @ret );
}
push @ret, @{ ext_grouplist($base) } if $type eq 'user' and $rc{GROUPLIST_PGM};
@ret = @{ sort_u( \@ret ) };
trace( 3, sort @ret );
return @ret;