diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index abde61941..97359c29d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,8 @@ - fix: upgrade from 6.99.4-6.99-5 can fail if site contains groups tied to ldap with no users in it. - GroupText macro returns an error message if it can't find the group by the name the user supplies. - fix: Unable to remove databaselinks (Thanks to misja) + - fix: Collaboration System hangs under certain conditions (Martin Kamerbeek + / Procolix) 7.0.1 - fix: User profile field "Department" needs i18n diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index 66211984d..125776731 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -192,8 +192,20 @@ sub appendTemplateLabels { #------------------------------------------------------------------- sub canEdit { my $self = shift; - return ((($self->session->form->process("func") eq "add" || ($self->session->form->process("assetId") eq "new" && $self->session->form->process("func") eq "editSave" && $self->session->form->process("class") eq "WebGUI::Asset::Post::Thread")) && $self->canPost) || # account for new posts - $self->SUPER::canEdit()); + return ( + ( + ( + $self->session->form->process("func") eq "add" || + ( + $self->session->form->process("assetId") eq "new" && + $self->session->form->process("func") eq "editSave" && + $self->session->form->process("class") eq "WebGUI::Asset::Post::Thread" + ) + ) && + $self->canPost + ) || # account for new posts + $self->SUPER::canEdit() + ); } #------------------------------------------------------------------- @@ -205,7 +217,15 @@ sub canModerate { #------------------------------------------------------------------- sub canPost { my $self = shift; - return (($self->get("status") eq "approved" || $self->getRevisionCount > 1) && ($self->session->user->isInGroup($self->get("postGroupId")) || $self->canEdit)); + return ( + ( + $self->get("status") eq "approved" || + $self->getRevisionCount > 1 + ) && ( + $self->session->user->isInGroup($self->get("postGroupId")) + || $self->SUPER::canEdit + ) + ); }