privileges being checked in the wrong place

This commit is contained in:
Frank Dillon 2008-11-18 22:26:54 +00:00
parent 6ef6348b3d
commit 41a688ac23

View file

@ -88,9 +88,6 @@ sub createInstance {
return undef;
}
#Visitor cannot access the acccount system
return $session->privilege->insufficient if($session->user->isVisitor);
#Create Pluggin Object
#Don't eval this as pluggable will croak and we want the calling module to handle the exception
my $pluggin = WebGUI::Pluggable::instanciate(
@ -161,6 +158,9 @@ sub handler {
#Pass through if it's not the account op
return undef unless ($form->get("op") eq "account");
#Visitor cannot access the acccount system
return $session->privilege->insufficient if($session->user->isVisitor);
my $module = $form->get("module");
my $method = $form->get("do");
my $uid = $form->get("uid");