aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-07-30 16:12:55 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2014-07-30 16:12:55 +0300
commit99b83be1159294d7e05a9630b9b4babab52836e1 (patch)
treefb27d6274f32e799048ce3b4290de82dd3fc40e7
parentcb408326e12c0f70b8cd9de532e394ac52755f40 (diff)
downloadgitaclhook-99b83be1159294d7e05a9630b9b4babab52836e1.tar.gz
gitaclhook-99b83be1159294d7e05a9630b9b4babab52836e1.tar.bz2
Use special project name "all" to match all projects.
-rwxr-xr-xgitaclhook2
-rw-r--r--lib/GitACL.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/gitaclhook b/gitaclhook
index ed6c390..0addbf5 100755
--- a/gitaclhook
+++ b/gitaclhook
@@ -81,13 +81,13 @@ Either B<allow> or B<deny>, to allow or deny the operation, correspondingly.
The name of the project. It is obtained by removing the directory
and suffix parts of the repository pathname. Thus, if the repository
is located in B</var/gitroot/foobar.git>, then the corresponding name of
the project is B<foobar>.
-An asterisk matches any project name.
+Special project name B<all> matches any project.
=item I<USER>[B<@>I<CIDRLIST>]
Name of the user. The word B<all> stands for any user, the word B<none>
matches no one at all. Otherwise, if this part begins with a percent
sign (B<%>), the rest of characters are treated as the name of the UNIX
diff --git a/lib/GitACL.pm b/lib/GitACL.pm
index 4214b3f..d3f6b35 100644
--- a/lib/GitACL.pm
+++ b/lib/GitACL.pm
@@ -159,13 +159,13 @@ sub match_tuple($$) {
return ( \&deny, "malformed line" ) unless $#x >= 2;
return ( \&deny, "unknown keyword" )
unless ($x[0] eq 'allow' || $x[0] eq 'deny');
return ( 0, "project mismatch" )
- if ($x[1] ne "*" and $x[1] ne $self->{project_name});
+ if ($x[1] ne "all" and $x[1] ne $self->{project_name});
return ( 0, "user mismatch" )
unless $self->match_user($x[2]);
return ( 0, "op mismatch" )
if ($#x >= 3 && index(uc $x[3], $self->{op}) == -1);
return ( 0, "ref mismatch" )
if ($#x == 4 && !$self->match_ref($x[4]));

Return to:

Send suggestions and report system problems to the System administrator.