rebel edition -- cos when you need it, you need it bad :-)

Summary: much as I did not want to use "excludes", I guess if we don't put the
code in "master" it's OK to at least *write* (and test) the code!

See the example config file for how to use it.

See "design choices" section in the "faq, tips, etc" document for how it
works.
This commit is contained in:
Sitaram Chamarty 2009-09-18 18:03:53 +05:30 committed by Sitaram Chamarty
parent bfc3b6cd58
commit 604669ca02
5 changed files with 93 additions and 1 deletions

View file

@ -186,7 +186,7 @@ sub parse_conf_file
@repos = expand_list ( @repos );
}
# actual permission line
elsif (/^(R|RW|RW\+) (.* )?= (.+)/)
elsif (/^(-|R|RW|RW\+) (.* )?= (.+)/)
{
my $perms = $1;
my @refs; @refs = split(' ', $2) if $2;

View file

@ -85,6 +85,7 @@ sub check_ref {
$refex = (keys %$ar)[0];
# refex? sure -- a regex to match a ref against :)
next unless $ref =~ /$refex/;
die "$perm $ref $ENV{GL_USER} DENIED by $refex\n" if $ar->{$refex} eq '-';
# as far as *this* ref is concerned we're ok
return if ($ar->{$refex} =~ /\Q$perm/);