diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index d042dab6c..e27a9b75c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -23,6 +23,7 @@ require that it be used. - fix: Image in trash though visible in article - fix: Direct 6.8.10-7.2+ Upgrade Problem + - fix: Prototype creation with no permissions (perlDreamer Consulting, LLC) - fix: Calendar feeds lastUpdated field only shows the year - fix: Calendar feeds do not work - fix: Sharing information between Calendars on the same server is now less diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 6dcfa50dd..18fc11149 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1894,6 +1894,7 @@ sub www_add { my $self = shift; my %prototypeProperties; my $class = $self->session->form->process("class","className"); + return $self->session->privilege->insufficient() unless ($class->canAdd($self->session)); if ($self->session->form->process('prototype')) { my $prototype = WebGUI::Asset->new($self->session, $self->session->form->process("prototype"),$class); foreach my $definition (@{$prototype->definition($self->session)}) { # cycle through rather than copying properties to avoid grabbing stuff we shouldn't grab @@ -1920,7 +1921,6 @@ sub www_add { $properties{isHidden} = 1 unless (WebGUI::Utility::isIn($class, @{$self->session->config->get("assetContainers")})); my $newAsset = WebGUI::Asset->newByPropertyHashRef($self->session,\%properties); $newAsset->{_parent} = $self; - return $self->session->privilege->insufficient() unless ($newAsset->canAdd($self->session)); return $newAsset->www_edit(); }