fixed: Wiki attachments uploaded by non-Content Managers deleted by maintenance workflow
fixed: Non-Content managers unable to paste assets even with edit privileges
This commit is contained in:
parent
970294d618
commit
35bfeac0ef
4 changed files with 14 additions and 7 deletions
|
|
@ -14,6 +14,8 @@
|
||||||
- added: Better error messages when SQL Report lacks a query (William McKee, Knowmad Technologies)
|
- added: Better error messages when SQL Report lacks a query (William McKee, Knowmad Technologies)
|
||||||
- fixed: edit branch sends thread notifications
|
- fixed: edit branch sends thread notifications
|
||||||
- fixed: changing style template with edit branch creates new revisions of assets that have no style template
|
- fixed: changing style template with edit branch creates new revisions of assets that have no style template
|
||||||
|
- fixed: Wiki attachments uploaded by non-Content Managers deleted by maintenance workflow
|
||||||
|
- fixed: Non-Content managers unable to paste assets even with edit privaledges
|
||||||
|
|
||||||
7.5.8
|
7.5.8
|
||||||
- moved Gallery utility methods to WebGUI::Utility::Gallery
|
- moved Gallery utility methods to WebGUI::Utility::Gallery
|
||||||
|
|
|
||||||
|
|
@ -48,12 +48,12 @@ sub duplicateBranch {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $childrenOnly = shift || 0;
|
my $childrenOnly = shift || 0;
|
||||||
|
|
||||||
my $newAsset = $self->duplicate({skipAutoCommitWorkflows=>1});
|
my $newAsset = $self->duplicate({skipAutoCommitWorkflows=>1,skipNotification=>1});
|
||||||
my $contentPositions = $self->get("contentPositions");
|
my $contentPositions = $self->get("contentPositions");
|
||||||
my $assetsToHide = $self->get("assetsToHide");
|
my $assetsToHide = $self->get("assetsToHide");
|
||||||
|
|
||||||
foreach my $child (@{$self->getLineage(["children"],{returnObjects=>1})}) {
|
foreach my $child (@{$self->getLineage(["children"],{returnObjects=>1})}) {
|
||||||
my $newChild = $childrenOnly ? $child->duplicate({skipAutoCommitWorkflows=>1}) : $child->duplicateBranch;
|
my $newChild = $childrenOnly ? $child->duplicate({skipAutoCommitWorkflows=>1, skipNotification=>1}) : $child->duplicateBranch;
|
||||||
$newChild->setParent($newAsset);
|
$newChild->setParent($newAsset);
|
||||||
my ($oldChildId, $newChildId) = ($child->getId, $newChild->getId);
|
my ($oldChildId, $newChildId) = ($child->getId, $newChild->getId);
|
||||||
$contentPositions =~ s/\Q${oldChildId}\E/${newChildId}/g if ($contentPositions);
|
$contentPositions =~ s/\Q${oldChildId}\E/${newChildId}/g if ($contentPositions);
|
||||||
|
|
|
||||||
|
|
@ -445,10 +445,13 @@ Returns "". Pastes an asset. If canEdit is False, returns an insufficient privil
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub www_paste {
|
sub www_paste {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||||
$self->paste($self->session->form->process("assetId"));
|
my $pasteAssetId = $self->session->form->process('assetId');
|
||||||
return "";
|
my $pasteAsset = WebGUI::Asset->newPending($self->session, $pasteAssetId);
|
||||||
|
return $self->session->privilege->insufficient() unless $pasteAsset->canEdit;
|
||||||
|
$self->paste($pasteAssetId);
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
@ -463,6 +466,9 @@ sub www_pasteList {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->session->privilege->insufficient() unless $self->canEdit;
|
return $self->session->privilege->insufficient() unless $self->canEdit;
|
||||||
foreach my $clipId ($self->session->form->param("assetId")) {
|
foreach my $clipId ($self->session->form->param("assetId")) {
|
||||||
|
my $pasteAsset = WebGUI::Asset->newPending($self->session, $clipId);
|
||||||
|
next
|
||||||
|
unless $pasteAsset->canEdit;
|
||||||
$self->paste($clipId);
|
$self->paste($clipId);
|
||||||
}
|
}
|
||||||
return $self->www_manageAssets();
|
return $self->www_manageAssets();
|
||||||
|
|
|
||||||
|
|
@ -689,7 +689,6 @@ An asset object reference representing the new parent to paste the asset to.
|
||||||
sub setParent {
|
sub setParent {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $newParent = shift;
|
my $newParent = shift;
|
||||||
return 0 unless $self->session->user->isInGroup('4');
|
|
||||||
return 0 unless (defined $newParent); # can't move it if a parent object doesn't exist
|
return 0 unless (defined $newParent); # can't move it if a parent object doesn't exist
|
||||||
return 0 if ($newParent->getId eq $self->get("parentId")); # don't move it to where it already is
|
return 0 if ($newParent->getId eq $self->get("parentId")); # don't move it to where it already is
|
||||||
return 0 if ($newParent->getId eq $self->getId); # don't move it to itself
|
return 0 if ($newParent->getId eq $self->getId); # don't move it to itself
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue