Added isVisitor, isAdmin, and isRegistered methods to User object instead
of hard coding checks everywhere with group ids. And updated the code base to match.
This commit is contained in:
parent
586164d8d0
commit
ef120fb06b
52 changed files with 201 additions and 118 deletions
|
|
@ -521,7 +521,7 @@ sub www_goBackToPage {
|
|||
sub www_preview {
|
||||
my $self = shift;
|
||||
$self->session->var->get("adminOn") = 0;
|
||||
return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(3));
|
||||
return $self->session->privilege->insufficient() unless ($self->session->user->isAdmin);
|
||||
my $nav = WebGUI::Navigation->new( depth=>$self->session->form->process("depth"),
|
||||
method=>$self->session->form->process("method"),
|
||||
startAt=>$self->session->form->process("startAt"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue