summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/Command.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-05-27 08:59:14 +0000
committerfukachan <fukachan>2002-05-27 08:59:14 +0000
commit9636a1a267556e84dd7487cd0c9ef74afd098041 (patch)
treeec0d3bdb52d312c95fd2c3e35168928e9a86f540 /fml/lib/FML/Process/Command.pm
parentae3064d26ff657899ea638f78f4f6c9a7c364fc0 (diff)
downloadfml8-9636a1a267556e84dd7487cd0c9ef74afd098041.tar.gz
fml8-9636a1a267556e84dd7487cd0c9ef74afd098041.tar.bz2
fml8-9636a1a267556e84dd7487cd0c9ef74afd098041.zip
rearrange admin command authentication to sync w/ new variable namings.
Diffstat (limited to 'fml/lib/FML/Process/Command.pm')
-rw-r--r--fml/lib/FML/Process/Command.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 61c54fdd..e237c1a4 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.57 2002/05/19 11:14:30 fukachan Exp $
+# $FML: Command.pm,v 1.58 2002/05/19 11:49:24 fukachan Exp $
#
package FML::Process::Command;
@@ -359,16 +359,19 @@ sub _auth_admin
my $config = $curproc->{ config };
my $rules = $config->get_as_array_ref('admin_command_restrictions');
for my $rule (@$rules) {
- if ($rule eq 'reject') {
+ $is_auth = $obj->$rule($curproc, $args, $optargs);
+
+ # reject as soon as possible
+ if ($is_auth eq '__LAST__') {
+ Log("admin: rejected by $rule");
return 0;
}
-
- $is_auth = $obj->$rule($curproc, $args, $optargs);
- if ($is_auth) {
+ elsif ($is_auth) {
+ Log("admin: auth by $rule");
return $is_auth;
}
else {
- Log("admin: $rule fail");
+ Log("admin: not match rule=$rule"); # XXX debug. remove this.
}
}
}