Prevent WikiPages from being manually added to places where they shouldn't.
This commit is contained in:
parent
8dd4d66c96
commit
1091616705
1 changed files with 3 additions and 1 deletions
|
|
@ -53,7 +53,9 @@ sub addRevision {
|
|||
sub canAdd {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
$class->next::method($session, undef, '7');
|
||||
my $assetCanAdd = $class->next::method($session, undef, '7');
|
||||
my $parentCheck = $session->asset->isa('WebGUI::Asset::Wobject::WikiPage');
|
||||
return $assetCanAdd && $parentCheck;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue