From 41a688ac23d78f60b57a1be889623987b49d7230 Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Tue, 18 Nov 2008 22:26:54 +0000 Subject: [PATCH] privileges being checked in the wrong place --- lib/WebGUI/Content/Account.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WebGUI/Content/Account.pm b/lib/WebGUI/Content/Account.pm index 6978381e0..b374cf249 100644 --- a/lib/WebGUI/Content/Account.pm +++ b/lib/WebGUI/Content/Account.pm @@ -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");