From da0342405176a779c4498faedcc3390393ccf499 Mon Sep 17 00:00:00 2001
From: Colin Kuskie
Date: Thu, 11 Jan 2007 03:56:44 +0000
Subject: [PATCH] Fix a bug with uploading files through the FilePile.
Permissions default to those of the parent, but if they are overridden in the FilePile
form the form settings are now taken.
---
docs/changelog/7.x.x.txt | 1 +
lib/WebGUI/Asset/FilePile.pm | 3 ++-
lib/WebGUI/i18n/English/Asset.pm | 12 ++++++------
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index 456fcf3dc..2724b2c14 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -1,6 +1,7 @@
7.3.5
- fix: CSS error in css03.css (perlDreamer Consulting, LLC)
- fix: event tooltips are now displaying properly in all browsers
+ - fix: .wgacess (perlDreamer Consulting, LLC)
7.3.4
diff --git a/lib/WebGUI/Asset/FilePile.pm b/lib/WebGUI/Asset/FilePile.pm
index d304a3159..3fbd8fb72 100644
--- a/lib/WebGUI/Asset/FilePile.pm
+++ b/lib/WebGUI/Asset/FilePile.pm
@@ -141,7 +141,7 @@ sub editSave {
foreach my $filename (@{$tempStorage->getFiles}) {
my $storage = WebGUI::Storage::Image->create($self->session);
$storage->addFileFromFilesystem($tempStorage->getPath($filename));
- $storage->setPrivileges($self->getParent->get("ownerUserId"),$self->getParent->get("groupIdView"),$self->getParent->get("groupIdEdit"));
+ #$storage->setPrivileges($self->getParent->get("ownerUserId"),$self->getParent->get("groupIdView"),$self->getParent->get("groupIdEdit"));
my %data;
my $selfName = 'WebGUI::Asset::File';
$selfName = "WebGUI::Asset::File::Image" if ($storage->isImage($filename));
@@ -154,6 +154,7 @@ sub editSave {
);
}
}
+ $storage->setPrivileges($data{"ownerUserId"},$data{"groupIdView"},$data{"groupIdEdit"});
$data{className} = $selfName;
$data{storageId} = $storage->getId;
$data{filename} = $data{title} = $data{menuTitle} = $filename;
diff --git a/lib/WebGUI/i18n/English/Asset.pm b/lib/WebGUI/i18n/English/Asset.pm
index 19fad5b6f..dee2ddf12 100644
--- a/lib/WebGUI/i18n/English/Asset.pm
+++ b/lib/WebGUI/i18n/English/Asset.pm
@@ -385,20 +385,20 @@ a URL will be made from the parent's URL and the Menu Title.
|,
},
'108 description' => {
- message => q|The owner of an asset is usually the person who created the asset. This user always has full edit and viewing rights of the asset.
+ message => q|The owner of an asset is usually the person who created the asset. This user always has full edit and viewing rights of the asset. This will default to the owner of the parent asset.
NOTE: The owner can only be changed by an administrator.
|,
- lastUpdated => 1165364456,
+ lastUpdated => 1168488001,
},
'872 description' => {
- message => q|Choose which group can view this asset. If you want both visitors and registered users to be able to view the asset then you should choose the "Everybody" group.
|,
- lastUpdated => 1146629267,
+ message => q|Choose which group can view this asset. If you want both visitors and registered users to be able to view the asset then you should choose the "Everybody" group. This will default to the group which can view the parent of this asset.
|,
+ lastUpdated => 1168488020,
},
'871 description' => {
- message => q|Choose the group that can edit this asset. The group assigned editing rights can also always view the asset.
|,
- lastUpdated => 1146629269,
+ message => q|Choose the group that can edit this asset. The group assigned editing rights can also always view the asset. This will default to the group that can edit the parent of this asset.
|,
+ lastUpdated => 1168488034,
},
'412 description' => {