fixed a typo in Forum.pm and a privileges problem in Post.pm

This commit is contained in:
JT Smith 2003-11-19 03:21:12 +00:00
parent d150016395
commit c3f98f8821
2 changed files with 5 additions and 3 deletions

View file

@ -100,7 +100,9 @@ The unique identifier to check privileges against. Defaults to the current user.
sub canView {
my ($self, $userId) = @_;
$userId = $session{user}{userId} unless ($userId);
if ($self->get("status") eq "deleted") {
if ($self->get("status") eq "approved" || $self->get("status") eq "archived") {
return 1;
} elsif ($self->get("status") eq "deleted") {
return 0;
} elsif ($self->get("status") eq "denied" && $userId == $self->get("userId")) {
return 1;