do not show edit tab in the wiki page unless you can edit it

This commit is contained in:
Colin Kuskie 2008-11-24 04:56:32 +00:00
parent f228561aa9
commit 241dcf7e8b
5 changed files with 103 additions and 0 deletions

View file

@ -346,6 +346,7 @@ sub view {
editContent => $self->getEditForm,
allowsAttachments => $self->getWiki->get("allowAttachments"),
comments => $self->getFormattedComments(),
canEdit => $self->canEdit,
content => $self->getWiki->autolinkHtml(
$self->scrubContent,
{skipTitles => [$self->get('title')]},

View file

@ -56,6 +56,9 @@ our $HELP = {
{ name => 'editLabel',
description => 'editLabel variable',
},
{ name => 'canEdit',
description => 'canEdit variable',
},
{ name => 'historyLabel',
description => 'historyLabel variable',
},

View file

@ -118,6 +118,11 @@ our $I18N =
lastUpdated => 1166047618,
},
'canEdit variable' => {
message => q|A boolean that indicates whether the current user can edit a page, or not.|,
lastUpdated => 1227501828,
},
'historyLabel variable' => {
message => q|An internationalized label to go with historyUrl.|,
lastUpdated => 1166047618,