- 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:
Doug Bell 2008-04-26 02:23:10 +00:00
parent ea1dac4064
commit 98992b8920
16 changed files with 742 additions and 120 deletions

View file

@ -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 ) );
}
#-------------------------------------------------------------------