diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f7859985e..80c148183 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,7 +1,8 @@ 7.6.9 - fixed #9428: added code to ASSET::get to include keywords when no property name is requested - marked sbin scripts as executable - - Problem #9492: in passing form variables to Macro SQL inside a snippet + - fixed #9492: Problem in passing form variables to Macro SQL inside a snippet + - fixed #9404: Head tags for admin user with admin mode off 7.6.8 - added #!/usr/bin/env perl to all utility scripts diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 3c3836bdf..88d072a55 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1333,7 +1333,7 @@ Returns a toolbar with a set of icons that hyperlink to functions that delete, e sub getToolbar { my $self = shift; - return undef unless $self->canEdit; + return undef unless $self->canEdit && $self->session->var->isAdminOn; return $self->{_toolbar} if (exists $self->{_toolbar}); my $userUiLevel = $self->session->user->profileField("uiLevel"); @@ -1432,6 +1432,7 @@ sub getToolbar { . $self->getUrl("op=assetManager") . '">' . $i18n->get("manage") . ''; } $output .= '' . $toolbar . ''; + $self->{_toolbar} = $output; return $output; } @@ -1988,9 +1989,8 @@ Executes what is necessary to make the view() method work with content chunking. sub prepareView { my $self = shift; - if ($self->session->var->isAdminOn) { - $self->{_toolbar} = $self->getToolbar; - } + ##Make the toolbar now and stick it in the cache. + $self->getToolbar; my $style = $self->session->style; my @keywords = @{WebGUI::Keyword->new($self->session)->getKeywordsForAsset({asset=>$self, asArrayRef=>1})}; if (scalar @keywords) {