Check permissions in account plugin

This commit is contained in:
Paul Driver 2011-05-25 15:44:46 -05:00
parent 7b7d1b4d2e
commit 7b796ed76e

View file

@ -172,6 +172,12 @@ sub callMethod {
);
return undef;
}
unless ($self->canView) {
my $session = $self->session;
$session->output->print($session->privilege->insufficient);
return undef;
}
#Try to call the method
my $output = eval { $self->$method(@{$args}) };