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.
This commit is contained in:
Colin Kuskie 2007-01-11 03:56:44 +00:00
parent d90a87699c
commit da03424051
3 changed files with 9 additions and 7 deletions

View file

@ -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;

View file

@ -385,20 +385,20 @@ a URL will be made from the parent's URL and the <b>Menu Title</b>.</p>|,
},
'108 description' => {
message => q|<p>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.</p>
message => q|<p>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.</p>
<p><b>NOTE:</b> The owner can only be changed by an administrator.
</p>|,
lastUpdated => 1165364456,
lastUpdated => 1168488001,
},
'872 description' => {
message => q|<p>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.</p>|,
lastUpdated => 1146629267,
message => q|<p>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.</p>|,
lastUpdated => 1168488020,
},
'871 description' => {
message => q|<p>Choose the group that can edit this asset. The group assigned editing rights can also always view the asset.</p>|,
lastUpdated => 1146629269,
message => q|<p>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.</p>|,
lastUpdated => 1168488034,
},
'412 description' => {