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
|
|
@ -1422,7 +1422,7 @@ Displays the badges purchased by the current user, or all users if the user is p
|
|||
sub www_lookupRegistrant {
|
||||
my ($self) = @_;
|
||||
my $session = $self->session;
|
||||
return $session->privilege->noAccess() unless ($self->canView && $self->session->user->userId ne "1");
|
||||
return $session->privilege->noAccess() unless ($self->canView && $self->session->user->isRegistered);
|
||||
|
||||
# set up template variables
|
||||
my %var = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue