Fix the canEdit method in the Matrix.
This commit is contained in:
parent
bfbe11ae32
commit
bf268bc66b
1 changed files with 3 additions and 10 deletions
|
|
@ -265,8 +265,7 @@ part of the C<groupToAdd> group.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub canEdit {
|
override canEdit => sub {
|
||||||
my $orig = shift;
|
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $userId = shift || $self->session->user->userId;
|
my $userId = shift || $self->session->user->userId;
|
||||||
|
|
||||||
|
|
@ -276,14 +275,8 @@ sub canEdit {
|
||||||
&& $form->get( 'class' )->isa( 'WebGUI::Asset::MatrixListing' ) ) {
|
&& $form->get( 'class' )->isa( 'WebGUI::Asset::MatrixListing' ) ) {
|
||||||
return $self->canAddMatrixListing();
|
return $self->canAddMatrixListing();
|
||||||
}
|
}
|
||||||
else {
|
return super();
|
||||||
if ($userId eq $self->ownerUserId) {
|
};
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
my $user = WebGUI::User->new($self->session, $userId);
|
|
||||||
return $user->isInGroup($self->groupIdEdit);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue