From 241dcf7e8b811a6554edfa7649d5aa592055d68a Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 24 Nov 2008 04:56:32 +0000 Subject: [PATCH] do not show edit tab in the wiki page unless you can edit it --- docs/changelog/7.x.x.txt | 1 + .../WikiPageTmpl0000000001.tmpl | 93 +++++++++++++++++++ lib/WebGUI/Asset/WikiPage.pm | 1 + lib/WebGUI/Help/Asset_WikiPage.pm | 3 + lib/WebGUI/i18n/English/Asset_WikiPage.pm | 5 + 5 files changed, 103 insertions(+) create mode 100644 docs/upgrades/packages-7.6.4/WikiPageTmpl0000000001.tmpl diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 0bdcce644..06243254d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -57,6 +57,7 @@ - fixed #9130: fixed: Rich editor creates root

tag even when set to use
- fixed: DataForm times out when exporting large data sets - fixed: DataForm entry data field is too small + - fixed #4213: Can see "edit" tab even tho i am not logged in 7.6.3 - improved performance of file uploads diff --git a/docs/upgrades/packages-7.6.4/WikiPageTmpl0000000001.tmpl b/docs/upgrades/packages-7.6.4/WikiPageTmpl0000000001.tmpl new file mode 100644 index 000000000..874b79425 --- /dev/null +++ b/docs/upgrades/packages-7.6.4/WikiPageTmpl0000000001.tmpl @@ -0,0 +1,93 @@ +#WikiPageTmpl0000000001 +#title: Default Wiki Page +#url: default-wiki-page +#menutitle: +#namespace: WikiPage +

+

+ +
+ +
+
+
+

^International(keywords,Asset);:

+
+
+
+
+
+ +
| | |
+~~~ + + + + + + + + + + diff --git a/lib/WebGUI/Asset/WikiPage.pm b/lib/WebGUI/Asset/WikiPage.pm index 6772b3293..620ccad7a 100644 --- a/lib/WebGUI/Asset/WikiPage.pm +++ b/lib/WebGUI/Asset/WikiPage.pm @@ -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')]}, diff --git a/lib/WebGUI/Help/Asset_WikiPage.pm b/lib/WebGUI/Help/Asset_WikiPage.pm index 6c82f2d54..3f81fe097 100644 --- a/lib/WebGUI/Help/Asset_WikiPage.pm +++ b/lib/WebGUI/Help/Asset_WikiPage.pm @@ -56,6 +56,9 @@ our $HELP = { { name => 'editLabel', description => 'editLabel variable', }, + { name => 'canEdit', + description => 'canEdit variable', + }, { name => 'historyLabel', description => 'historyLabel variable', }, diff --git a/lib/WebGUI/i18n/English/Asset_WikiPage.pm b/lib/WebGUI/i18n/English/Asset_WikiPage.pm index 3f8d20824..6949d85c8 100644 --- a/lib/WebGUI/i18n/English/Asset_WikiPage.pm +++ b/lib/WebGUI/i18n/English/Asset_WikiPage.pm @@ -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,