ShowAccessPlugin
Read and Showw accessrights of topics
Overview
This plugin adds two tags that allow to list the access rights of a known user for all topics in a web and to list all users, who are allowed to view the actual topic.
Related work
There are other methods available to determine the access rights by using the IFACCESS includes in the
TWiki:Plugins.IfDefinedPlugin
of using a complex search string.
The advantage of this plugin is getting a simpler mechanism for checking the access rights a certain user has to topics and to check the users allowed to view content.
Syntax Rules
SHOWACCESS
Syntax:
%SHOWACCESS{ "view" topic="topicname" web="webname" user="Wikiname" }%
Parameters:
-
"view", "change", or type="...": Check if user is allowed to view or change the topic. Default: "view".
-
topic="...": Topic name. Default: Current topic.
-
web="...": Web name. Default: Current web.
-
user="...": WikiName of user. Default: Current user.
Returns YES or NO depending on the access right of the user for the specified topic. If there is no access right to view the topic the value for the access right to change will be also NO (in contrary to the IFACCESS tag of the
TWiki:Plugins.IfDefinedPlugin
), since TWiki usually does not allow changes in topics, where the user does not have the right to view the topic.
READACCESS
Syntax:
%READACCESS{ topic="topicname" web="webname" separator=", " }%
Parameters:
-
topic="...": Topic name. Default: Current topic.
-
web="...": Web name. Default: Current web.
-
separator="...": Separator. Default: ", ".
This variable lists all users, who are allowed to view the current topic. This is useful for administrators to reassure that the access rights for all topics or a certain topic have been set properly. It also can be used for debugging, if a new application (like an internal mail system), which restrict the right to view of topics, is implemented. Hence users can see, who is allowed to read the content they process. This ensures that users are informed about view rights and are reassured by knowing, who is allowed to read their content. This tool is useful in restricted environments, but not is public webs.
Examples
%SHOWACCESS% results in e.g.:
%READACCESS% results in e.g.:
WolfMarbach,
PeterThoeny
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
- For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.
- Or, follow these manual installation steps:
- Download the ZIP file from the Plugins home (see below).
- Unzip
ShowAccessPlugin.zip in your twiki installation directory. Content: | File: | Description: |
data/TWiki/ShowAccessPlugin.txt | Plugin topic |
lib/TWiki/Plugins/ShowAccessPlugin.pm | Plugin Perl module |
- Set the ownership of the extracted directories and files to the webserver user.
- Plugin configuration:
- Run the configure script and enable the plugin in the Plugins section.
Plugin Info
- Set SHORTDESCRIPTION = Read and show access rights of topics
Related Topics: TWikiPlugins,
AdminDocumentationCategory