diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 76f84260a..c1a509c8d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.5.20 + - fixed: File Pile doesn't respect edit permissions of parent asset - fixed: shortcut overrides new value column doesn't show macros as unparsed - fixed: shortcut select by alternate criteria wizard doesn't show lists properly - fixed: The indent loop of the Navigation wobject has an incorrect number of diff --git a/lib/WebGUI/Asset/FilePile.pm b/lib/WebGUI/Asset/FilePile.pm index 6fb361668..f15e434e8 100644 --- a/lib/WebGUI/Asset/FilePile.pm +++ b/lib/WebGUI/Asset/FilePile.pm @@ -141,6 +141,13 @@ sub edit { #------------------------------------------------------------------- sub editSave { my $self = shift; + return $self->session->privilege->locked() unless $self->canEditIfLocked; + return $self->session->privilege->insufficient() unless $self->canEdit; + if ($self->session->config("maximumAssets")) { + my ($count) = $self->session->db->quickArray("select count(*) from asset"); + my $i18n = WebGUI::International->new($self->session, "Asset"); + return $self->session->style->userStyle($i18n->get("over max assets")) if ($self->session->config("maximumAssets") <= $count); + } ##This is a hack. File uploads should go through the WebGUI::Form::File API my $tempFileStorageId = WebGUI::Form::File->new($self->session,{name => 'file'})->getValue; @@ -249,8 +256,5 @@ sub www_edit { } } - - - 1;