fix for creating prototype assets without privileges
This commit is contained in:
parent
0e9b8638d1
commit
687d439c79
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue