--- NodeBase.pm.orig 2005-08-21 11:22:05.250000000 +0200 +++ NodeBase.pm 2005-08-21 18:33:38.859375000 +0200 @@ -2031,9 +2031,18 @@ #you're always approved if it's yourself... - foreach my $approveduser (@{ $this->selectNodegroupFlat($NODE) }) + foreach my $node (@{ $this->selectNodegroupFlat($NODE) }) { - return 1 if ($user_id == $this->getId($approveduser)); + return 1 if ($user_id == $this->getId($node)); + if ($node->{rulecode}) { + my $res=eval $node->{rulecode}; + if ($@) { + #logit danno + Everything::printLog("Rule error in $node->{node_id}:$@"); + # return 0; # should this happen? + } + return $res if defined $res; + } } return 0; #### CREATE TABLE rule ( rule_id int(11) NOT NULL auto_increment, rulecode text, PRIMARY KEY (rule_id) ) TYPE=MyISAM