fix - Cannot add new page to the Wiki
This commit is contained in:
parent
7614874253
commit
a7976f7256
2 changed files with 28 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
||||||
- fix: Daily recurring payment reports should now be sent to the
|
- fix: Daily recurring payment reports should now be sent to the
|
||||||
configured "commerceSendDailyReportTo" address.
|
configured "commerceSendDailyReportTo" address.
|
||||||
- fix: Closed Posts Displaying in CS
|
- fix: Closed Posts Displaying in CS
|
||||||
|
- fix: Cannot add new page to the Wiki
|
||||||
|
|
||||||
7.3.3
|
7.3.3
|
||||||
- fix: Wiki Purge throws fatal
|
- fix: Wiki Purge throws fatal
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,33 @@ sub autolinkHtml {
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub canAdminister {
|
sub canAdminister {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
return $self->session->user->isInGroup($self->get('groupToAdminister')) || $self->canEdit;
|
return $self->session->user->isInGroup($self->get('groupToAdminister')) || $self->SUPER::canEdit;
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 canEdit ( )
|
||||||
|
|
||||||
|
Overriding canEdit method to check permissions correctly when someone is adding a wikipage
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub canEdit {
|
||||||
|
my $self = shift;
|
||||||
|
return (
|
||||||
|
(
|
||||||
|
(
|
||||||
|
$self->session->form->process("func") eq "add" ||
|
||||||
|
(
|
||||||
|
$self->session->form->process("assetId") eq "new" &&
|
||||||
|
$self->session->form->process("func") eq "editSave" &&
|
||||||
|
$self->session->form->process("class") eq "WebGUI::Asset::WikiPage"
|
||||||
|
)
|
||||||
|
) &&
|
||||||
|
$self->canEditPages
|
||||||
|
) || # account for new posts
|
||||||
|
$self->SUPER::canEdit()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue