Prevent WikiPages from being manually added to places where they shouldn't.

This commit is contained in:
Colin Kuskie 2009-02-03 00:11:52 +00:00
parent 8dd4d66c96
commit 1091616705

View file

@ -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;
}
#-------------------------------------------------------------------