Skip to content

Commit

Permalink
Check permissions in account plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
frodwith committed May 25, 2011
1 parent 53016ef commit 8dbc72e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/WebGUI/Account.pm
Expand Up @@ -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}) };
Expand Down

0 comments on commit 8dbc72e

Please sign in to comment.