Fixing require loops. Moose overrides for canEdit using packages.
This commit is contained in:
parent
d69ed84fd4
commit
c835344813
14 changed files with 69 additions and 60 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue