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

@ -150,12 +150,13 @@ group to edit the parent Map are allowed to edit MapPoint.
=cut
sub canEdit {
around canEdit => sub {
my $orig = shift;
my $self = shift;
my $userId = shift || $self->session->user->userId;
return 1 if $userId eq $self->ownerUserId;
return $self->SUPER::canEdit( $userId );
}
return $self->$orig( $userId );
};
#-------------------------------------------------------------------