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:
JT Smith 2008-09-16 22:32:36 +00:00
parent 586164d8d0
commit ef120fb06b
52 changed files with 201 additions and 118 deletions

View file

@ -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 = (