no more getSlave, convert code to use dbSlave instead
more form accessor fixes Form/Template.pm, all asset calls need a session var
This commit is contained in:
parent
77f9ae07b2
commit
197dacadec
9 changed files with 13 additions and 15 deletions
|
|
@ -93,15 +93,15 @@ Renders a template picker control.
|
|||
|
||||
sub toHtml {
|
||||
my $self = shift;
|
||||
my $templateList = WebGUI::Asset::Template->getList($self->get("namespace"));
|
||||
my $templateList = WebGUI::Asset::Template->getList($self->session, $self->get("namespace"));
|
||||
#Remove entries from template list that the user does not have permission to view.
|
||||
for my $assetId ( keys %{$templateList} ) {
|
||||
my $asset = WebGUI::Asset::Template->new($assetId);
|
||||
my $asset = WebGUI::Asset::Template->new($self->session, $assetId);
|
||||
if (!$asset->canView($self->session->user->userId)) {
|
||||
delete $templateList->{$assetId};
|
||||
}
|
||||
}
|
||||
$self->get("options") = $templateList;
|
||||
$self->set("options", $templateList);
|
||||
$self->setManageIcons();
|
||||
return $self->SUPER::toHtml();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue