return DECLINED() unless exists $config->ok_tables->{ $self->{table} };
# Is it public?
- return DECLINED unless $r->model_class->is_public( $r->{action} );
+ return DECLINED unless $self->model_class->is_public( $self->{action} );
return OK();
}
sub is_public {
my ( $self, $action ) = @_;
my $cv = $self->can($action);
- return DECLINED() unless $cv;
+ return 0 unless $cv;
my $attrs = join " ", attributes::get($cv);
do {
warn "$action not exported" if Maypole->debug;
- return DECLINED();
+ return 0;
} unless $attrs =~ /\bExported\b/i;
- return OK;
+ return 1;
}
1;