Feature Proposal: Add some optional verbiage to the Access Denied message.


We occasionally get the complaint that we don't allow edit on our System web. Also if we add restrictions to the Extensions, Download or other webs, it would be nice to explain why the web is restricted and how to obtain access.

Description and Documentation

We could do this a couple of ways.
  • Create a WebRestrictions topic that describes reasons for any restrictions or
  • Add an optional "ACLDescription" section to the WebPreferences topic.

And, to the access_denied template, add:

%INCLUDE{"WebPreferences,WebRestrictions" section="ACLDescription" warn="off"}%

We can add this to foswiki.org via a skin override, but it might be useful to others. This is more friendly than the "contact the webmaster" message.


In WebPreferences:
The System web on Foswiki.org is under Source Revision Control in
[[https://github.com/foswiki/distro][Github]].  You can propose changes by
[[Tasks/WebHome][Creating a task]].




diff --git a/core/data/System/WebPreferences.txt b/core/data/System/WebPreferences.txt
index 71e9b37..f90c519 100644
--- a/core/data/System/WebPreferences.txt
+++ b/core/data/System/WebPreferences.txt
@@ -44,5 +44,11 @@ Users or groups allowed to change or rename this <nop>%TOPIC% topic
+Webprefs: The System web on Foswiki.org is under Source Revision Control in
+[[https://github.com/foswiki/distro][Github]].  You can propose changes by
+[[Tasks/WebHome][Creating a task]].
diff --git a/core/templates/messages.tmpl b/core/templates/messages.tmpl
index 0e38e26..db2ada3 100644
--- a/core/templates/messages.tmpl
+++ b/core/templates/messages.tmpl
@@ -408,6 +408,8 @@ registermessages.tmpl
 %MAKETEXT{"Action [_1]: [_2] by user [_3]." args="\"%PARAM1%\", %PARAM2%, <nop>%WIKINAME%"}%
+%INCLUDE{"WebPreferences,WebRestrictions" section="ACLDescription" warn="off"}%
 %MAKETEXT{"To login as another user please do so [[[_1]][here]]." args="%LOGINURL%"}%
 %MAKETEXT{"Contact [_1] if you have any questions." args="<a href=\"mailto:%WIKIWEBMASTER%?subject=%ENCODE{"%PARAM1% access denied for '%WEB%.%TOPIC%'"}%\">%WIKIWEBMASTER%</a>"}%

-- Contributors: GeorgeClark - 23 Jan 2017


By setting include as %INCLUDE{"WebPreferences,WebRestrictions" section="ACLDescription" warn="off"}% Then a site that has completely view restricted a web can create a WebRestrictions topic for the message.

-- GeorgeClark - 23 Jan 2017

For now on foswiki.org, we can override this with the "fo" skin, which currently only adds the dismissable broadcast message. So no need to push this into 2.1.3

-- GeorgeClark - 23 Jan 2017

Done. Implemented on foswiki.org with a template override. messages.fo.tmpl

-- GeorgeClark - 23 Jan 2017
Topic revision: r4 - 30 Jan 2018, MichaelDaum - This page was cached on 24 Jan 2021 - 04:12.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy