Fixing require loops. Moose overrides for canEdit using packages.

This commit is contained in:
Colin Kuskie 2010-04-08 15:13:13 -07:00
parent d69ed84fd4
commit c835344813
14 changed files with 69 additions and 60 deletions

View file

@ -200,11 +200,12 @@ can manage the parent you can edit this Shortcut.
=cut
sub canEdit {
my $self = shift;
return 1 if ($self->SUPER::canEdit || ($self->isDashlet && $self->getParent->canManage));
return 0;
}
around canEdit => sub {
my $orig = shift;
my $self = shift;
return 1 if ($self->$orig(@_) || ($self->isDashlet && $self->getParent->canManage));
return 0;
};
#-------------------------------------------------------------------