fix: Collaboration System hangs under certain conditions
This commit is contained in:
parent
5d066b3338
commit
d917598fd0
2 changed files with 25 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue