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
|
|
@ -771,7 +771,7 @@ sub www_edit {
|
|||
sub www_getUserPrefsForm {
|
||||
#This is a form retrieved by "ajax".
|
||||
my $self = shift;
|
||||
return 'You are no longer logged in' if $self->session->user->userId eq '1';
|
||||
return 'You are no longer logged in' if $self->session->user->isVisitor;
|
||||
return 'You are not allowed to personalize this Dashboard.' unless $self->getParent->canPersonalize;
|
||||
my $output;
|
||||
my @fielden = $self->getPrefFieldsToShow;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue