fixed a typo in Forum.pm and a privileges problem in Post.pm
This commit is contained in:
parent
d150016395
commit
c3f98f8821
2 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue