distinguish "repo not found" from "no access" if the user has rights anyway
thanks to Jesse from the Fedora team for pointing this out. They use GL_NO_CREATE_REPOS, so sometimes the physical repo on disk doesn't exist at the time the config file is written. We're talking about non-wild repos only here, so this means it should never happen to normal gitolite users. But now -- in the rare case that there is a disk-side problem -- people who have rights to a repo will get a more specific error message.
This commit is contained in:
parent
adbafdfc2d
commit
c25e05d87b
|
@ -437,7 +437,7 @@ sub expand_wild
|
||||||
$perm = ( $repos{$repo}{C}{'@all'} ? ' @C' : ( $repos{$repo}{C}{$ENV{GL_USER}} ? ' =C' : ' ' )) if $GL_WILDREPOS;
|
$perm = ( $repos{$repo}{C}{'@all'} ? ' @C' : ( $repos{$repo}{C}{$ENV{GL_USER}} ? ' =C' : ' ' )) if $GL_WILDREPOS;
|
||||||
# if you didn't have perms to create it, delete the "convenience"
|
# if you didn't have perms to create it, delete the "convenience"
|
||||||
# copy of the ACL that parse_acl makes
|
# copy of the ACL that parse_acl makes
|
||||||
delete $repos{$repo} unless $perm =~ /C/;
|
delete $repos{$repo} if $perm !~ /C/ and $wild;
|
||||||
$creator = "<notfound>";
|
$creator = "<notfound>";
|
||||||
}
|
}
|
||||||
$perm .= ( $repos{$repo}{R}{'@all'} ? ' @R' : ( $repos{'@all'}{R}{$ENV{GL_USER}} ? ' #R' : ( $repos{$repo}{R}{$ENV{GL_USER}} ? ' R' : ' ' )));
|
$perm .= ( $repos{$repo}{R}{'@all'} ? ' @R' : ( $repos{'@all'}{R}{$ENV{GL_USER}} ? ' #R' : ( $repos{$repo}{R}{$ENV{GL_USER}} ? ' R' : ' ' )));
|
||||||
|
|
Loading…
Reference in a new issue