From 0d371ac957840ba8152d5fd11357cd850ffbd76c Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 4 Oct 2012 22:01:57 +0530 Subject: [PATCH] call GROUPLIST_PGM before determining user_roles()... thanks to Stephane Chazelas [1] [1]: https://groups.google.com/d/topic/gitolite/gy_ZkrxGSjg --- src/lib/Gitolite/Conf/Load.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Gitolite/Conf/Load.pm b/src/lib/Gitolite/Conf/Load.pm index dcc559c..4abfa90 100644 --- a/src/lib/Gitolite/Conf/Load.pm +++ b/src/lib/Gitolite/Conf/Load.pm @@ -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;