Centrally reject any write-urls for r/o-users.

We currently filter for create/edit/delete in any part of the uri.
agranig/1_0_subfix
Andreas Granig 13 years ago
parent e43fc4b1c5
commit a4103ee09f

@ -52,6 +52,15 @@ sub auto :Private {
$c->log->debug("*** Root::auto grant access for authenticated user");
# check for read_only on write operations
if($c->user->read_only && (
$c->req->uri->path =~ /create/
|| $c->req->uri->path =~ /edit/
|| $c->req->uri->path =~ /delete/
)) {
$c->detach('/denied_page');
}
# load top menu widgets
my $plugin_finder = NGCP::Panel::Widget->new;
my $topmenu_templates = [];

Loading…
Cancel
Save