Prevent Event, WikiPage and Thread from being pasted places where they don't
belong. This allows chained method calls to "getMyParent", getParent, getWiki, getCalendar, etc. to work. Adds the new canPaste and validParent method to Asset and AssetClipboard.
This commit is contained in:
parent
151ebbde09
commit
99d6796675
6 changed files with 75 additions and 22 deletions
|
|
@ -868,6 +868,22 @@ sub updateThreadRating {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 validParent
|
||||
|
||||
Make sure that the current session asset is a CS for pasting and adding checks.
|
||||
|
||||
This is a class method.
|
||||
|
||||
=cut
|
||||
|
||||
sub validParent {
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
return $session->asset->isa('WebGUI::Asset::Wobject::Collaboration');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue