aboutsummaryrefslogtreecommitdiff
path: root/lib/GitACL.pm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-06-25 12:36:31 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2013-06-25 12:36:31 +0300
commit33ba97cd28f138b49697273e445b479d42bf42a9 (patch)
treea2d1fe3d439dd92dbcf33e23fc07cfad8d264e52 /lib/GitACL.pm
parentec125e9f860adf89f72e25641c65a1dc79c1e4a9 (diff)
downloadgitaclhook-33ba97cd28f138b49697273e445b479d42bf42a9.tar.gz
gitaclhook-33ba97cd28f138b49697273e445b479d42bf42a9.tar.bz2
Bugfixes.release-1.00
* gitacl.schema: An example LDAP schema. * MANIFEST: Add gitacl.schema * Makefile.PL: Update. * gitaclhook: Fix passing 'user' parameter in test mode. * lib/GitACL.pm: Fix malformed references.
Diffstat (limited to 'lib/GitACL.pm')
-rw-r--r--lib/GitACL.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/GitACL.pm b/lib/GitACL.pm
index 51024ac..57b38b8 100644
--- a/lib/GitACL.pm
+++ b/lib/GitACL.pm
@@ -37,13 +37,13 @@ sub logmsg($$$;$) {
my $status = shift;
my $message = shift;
my $loc = shift;
my $fd;
- open($fd, $self->logfile);
+ open($fd, $self->{logfile});
if ($loc) {
print $fd "$status:$loc: $message\n";
} else {
print $fd "$status: $message\n";
}
close($fd);
@@ -51,13 +51,13 @@ sub logmsg($$$;$) {
sub deny($$;$) {
my ($self, $msg, $loc) = @_;
$self->logmsg("DENY",
"$self->{project_name}:$self->{user_name}:".
- "opstr{$self->{op}}:$self->{ref}:$self->{old}:$self->{new}: $msg",
+ "$opstr{$self->{op}}:$self->{ref}:$self->{old}:$self->{new}: $msg",
$loc);
$self->debug(1, "denied by $loc") if $loc;
print STDERR "denied: $msg\n" unless $self->{quiet};
exit 1;
}
@@ -173,14 +173,14 @@ sub new {
if (defined($args{logfile})) {
$obj->{logfile} = $args{logfile};
} else {
$obj->{logfile} = git_value('config', 'hooks.acllog');
}
- if ($obj->{logfile} && $obj->logfile !~ /[>|]/) {
- $obj->{logfile} = ">>${obj->logfile}";
+ if ($obj->{logfile} && $obj->{logfile} !~ /[>|]/) {
+ $obj->{logfile} = ">>$obj->{logfile}";
}
if (defined($args{quiet})) {
$obj->{quiet} = $args{quiet};
} elsif (!$obj->{debug}) {
$obj->{quiet} = git_value('config', 'hooks.aclquiet');

Return to:

Send suggestions and report system problems to the System administrator.