auth: do not implicitly assign RW access for creaters

a configuration like this:

    repo CREATER/.*
        C       =   CREATER
        RW+     =   WRITERS

was buggy; CREATER was implicitly part of WRITERS so he got RW
permissions implicitly, so the push went through
This commit is contained in:
Sitaram Chamarty 2010-03-27 22:31:10 +05:30
parent 6e17c74abf
commit a45d2d9912

View file

@ -173,7 +173,7 @@ if ( -d "$repo_base_abs/$repo.git" ) {
my ($creater, $user_R, $user_W) = &repo_rights($repo_base_abs, $repo, $user); my ($creater, $user_R, $user_W) = &repo_rights($repo_base_abs, $repo, $user);
&parse_acl($GL_CONF_COMPILED, $repo, $creater, $user_R, $user_W); &parse_acl($GL_CONF_COMPILED, $repo, $creater, $user_R, $user_W);
} else { } else {
&parse_acl($GL_CONF_COMPILED, $repo, $user, $user, $user); &parse_acl($GL_CONF_COMPILED, $repo, $user, "NOBODY", "NOBODY");
# auto-vivify new repo if you have C access (and wildrepos is on) # auto-vivify new repo if you have C access (and wildrepos is on)
if ( $GL_WILDREPOS and $repos{$repo}{C}{$user} || $repos{$repo}{C}{'@all'} ) { if ( $GL_WILDREPOS and $repos{$repo}{C}{$user} || $repos{$repo}{C}{'@all'} ) {