- added: Inbox is now pruned after 1 year
- Added about a hundred tests for Collaboration system, Post, and Thread permissions - Cleaned up code tested by the aforementioned tests - Fixed all Test::WWW::Mechanize tests and updated the skeleton. Should be usable now.
This commit is contained in:
parent
ea1dac4064
commit
98992b8920
16 changed files with 742 additions and 120 deletions
|
|
@ -47,14 +47,19 @@ sub canAdd {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub canReply {
|
||||
my $self = shift;
|
||||
return !$self->isThreadLocked && $self->getParent->get("allowReplies") && $self->getParent->canPost;
|
||||
my $self = shift;
|
||||
my $userId = shift || $self->session->user->userId;
|
||||
return !$self->isThreadLocked
|
||||
&& $self->getParent->get("allowReplies")
|
||||
&& $self->getParent->canPost( $userId )
|
||||
;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub canSubscribe {
|
||||
my $self = shift;
|
||||
return ($self->session->user->userId ne "1" && $self->canView);
|
||||
my $self = shift;
|
||||
my $userId = shift || $self->session->user->userId;
|
||||
return ($userId ne "1" && $self->canView( $userId ) );
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue