diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 52eb98b8c..f82b9bd0a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,7 @@ - fixed #11464: blank page after setting posts per page in Collaboration System to 0 (zero) - fixed #11472: View Calendar Month help missing - fixed #11471: Errors in Calendar Event Edit template (Dale Trexel / U of MN Law School) + - fixed #11475: Inherit permissions on imported package fails if asset already exists. 7.9.0 - added #11383: AJAX username checks at registration (Luke Robinson / Orchard Solutions) diff --git a/lib/WebGUI/AssetPackage.pm b/lib/WebGUI/AssetPackage.pm index 925aa0544..abeac83d4 100644 --- a/lib/WebGUI/AssetPackage.pm +++ b/lib/WebGUI/AssetPackage.pm @@ -128,6 +128,14 @@ from the asset where it is deployed. Forces the package to ignore the revisionDate inside it. This makes the imported package the latest revision of an asset. +=head4 clearPackageFlag + +Clears the isPackage flag on the incoming asset. + +=head4 setDefaultTemplate + +Set the isDefault flag on the incoming asset. Really only works on templates. + =cut sub importAssetData { @@ -181,16 +189,10 @@ sub importAssetData { }; if (defined $asset) { # create a new revision of an existing asset $error->info("Creating a new revision of asset $id"); - $asset = $asset->addRevision($data->{properties}, $version, {skipAutoCommitWorkflows => 1}); + $asset = $asset->addRevision(\%properties, $version, {skipAutoCommitWorkflows => 1}); } else { # add an entirely new asset $error->info("Adding $id that didn't previously exist."); - my %properties = %{ $data->{properties} }; - if ($options->{inheritPermissions}) { - $properties{ownerUserId} = $self->get('ownerUserId'); - $properties{groupIdView} = $self->get('groupIdView'); - $properties{groupIdEdit} = $self->get('groupIdEdit'); - } $asset = $self->addChild(\%properties, $id, $version, {skipAutoCommitWorkflows => 1}); } }