ARC TWiki
>
TWiki Web
>
WebPermissionsPlugin
(2013-06-18,
TWikiContributor
)
(raw view)
Ra
w
edit
|
E
dit
A
ttach
---+ Web Permissions Plugin <!-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/WebPermissionsPlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/WebPermissionsPluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. --> <sticky><div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC{title="Page contents" depth="3"}% </div></sticky> %SHORTDESCRIPTION% <!-- * Set C = <img src="%ATTACHURL%/CHANGE.gif" /> * Set V = <img src="%ATTACHURL%/VIEW.gif" /> * Set Y = <input checked="checked" type="checkbox" /> * Set N = <input type="checkbox" /> --> ---++ Introduction This plugin provides a centralized interface to TWiki permissions. Web permissions are presented as a matrix that has columns of webs and rows of users. For each web, you can control which users can view or change that web. All user webs, every registered user (except admin users), and every group (except admin groups) are shown in the matrix. To interactively edit topic permissions, it adds an "Edit topic ACLs" option to the "More Actions" page. ---++ Web Permissions This interface allows you to control <table class="twikiTable"> <tr><th width="50%"> Viewing </th><th width="50%"> Editing </th></tr> <tr><td> VIEW = %V% CHANGE = %C% <table class="twikiTable"> <tr><th></th><th>Albums</th><th>Singles</th><th>Reviews</th><th>Statistics</th></tr> <tr><th>AnnieLennox<td>%V%%C%</td><td>%V%%C%</td><td>%V%%C%</td><td>%V%</td></tr> <tr><th>BillyBragg </th><td>%V%<td>%V%</td><td>%V%</td><td></td></tr> <tr><th>ColinTowns </th><td>%V%%C%</td><td>%V%%C%</td><td>%V%%C%</td><td>%V%</td></tr> <tr><th>DavidSoul </th><td></td><td>%V%%C%</td><td></td><td>%V%</td></tr> <tr><th>EaglesGroup </th><td>%C%<td></td><td>%V%%C%</td><td>%V%</td></tr> </table> <button>Edit</button> </td><td> VIEW = %V% CHANGE = %C% <table class="twikiTable" border="1"> <tr><th></th><th>Albums</th><th>Singles</th><th>Reviews</th><th>Statistics</th></tr> <tr><th>AnnieLennox </th><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%N%%C%</td></tr> <tr><th>BillyBragg </th><td style="white-space:nowrap">%Y%%V%%N%%C%</td><td style="white-space:nowrap">%Y%%V%%N%%C%</td><td style="white-space:nowrap">%Y%%V%%N%%C%</td><td style="white-space:nowrap">%N%%V%%N%%C%</td></tr> <tr><th>ColinTowns </th><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%N%%C%</td></tr> <tr><th>DavidSoul </th><td style="white-space:nowrap">%N%%V%%N%%C%</td><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%N%%V%%N%%C%</td><td style="white-space:nowrap">%Y%%V%%N%%C%</td></tr> <tr><th>EaglesGroup </th><td style="white-space:nowrap">%N%%V%%Y%%C%</td><td style="white-space:nowrap">%N%%V%%N%%C%</td><td style="white-space:nowrap">%Y%%V%%Y%%C%</td><td style="white-space:nowrap">%Y%%V%%N%%C%</td></tr> </table> <button>Save</button> <button>Cancel</button> </td></tr></table> <hr /> This control model is very useful in cases such as a web per project environment. In this case you will probably want to give team members change access to the specific projects they are working on. The plugin gives you a simple, one page interface, for handling these permissions. The plugin tries very hard to keep the permissions specification you started with, though it does move them to METADATA. ---++ Topic Permissions <!-- * Set LEFT = <img src="%ATTACHURL%/leftarrow.png" alt="<"/> * Set RIGHT = <img src="%ATTACHURL%/rightarrow.png" alt=">"/> * Set UP = <img src="%ATTACHURL%/uparrow.png" alt="^"/> * Set DOWN = <img src="%ATTACHURL%/downarrow.png" alt="v"/> --> <form name="topicpermissionsform" method="post" > <table border="0"><tbody><tr> <td rowspan="3" width="40%"> <h4><a name="All_Users_and_Groups"></a> All Users and Groups </h4> <select size="14" name="disallowedusers" multiple="multiple" style="width: 100%;"> <optgroup label="Groups"></optgroup> <optgroup label="Users"><option>TWikiContributor</option><option>TWikiGuest</option></optgroup></select> </td><td align="center" width="100"> <button type="button" style="width: 100%;" class="twikiButton" name="action_save" id="save">%LEFT% Remove</button> <button type="button" style="width: 100%;" class="twikiButton" name="action_cancel" id="cancel">Add %RIGHT%</button></td> <td width="40%"> <h4><a name="Editors"></a> Editors </h4> <select size="5" name="topiceditors" multiple="multiple" style="width: 100%;"> <optgroup label="Groups"> <option>TWikiAdminGroup</option> </optgroup><optgroup label="Users"> <option>AnnieLennox</option> </optgroup></select> </td> </tr> <tr><td></td> <td align="center" valign="center"> <button type="button" style="height: 20px; width: 30%;" class="twikiButton" name="action_save" id="save">%DOWN%</button> <button type="button" style="height: 20px; width: 30%;" class="twikiButton" name="action_cancel" id="cancel">%UP%</button> </td> </tr> <tr><td align="center"> <button type="button" style="width: 100%;"class="twikiButton" name="action_save" id="save">%LEFT% Remove</button> <button type="button" style="width: 100%;" class="twikiButton" name="action_cancel" id="cancel">Add %RIGHT%</button></td> <td><h4><a name="Viewers"></a> Viewers </h4> <select size="5" name="topicviewers" multiple="multiple" style="width: 100%;"> <optgroup label="Groups"> <option>NobodyGroup</option> </optgroup><optgroup label="Users"> <option>TWikiRegistrationAgent</option><option>UnknownUser</option> </optgroup></select></td> </tr><tr height="10"> </tr><tr> <td colspan="3" align="right"> <input class="twikiSubmit" name="topic_permissions_action" id="save" value="Save" > <input class="twikiButton" name="topic_permissions_action" id="cancel" value="Cancel"> </td> </tr> </tbody></table> </form> <hr /> ---++ Syntax Rules The web permissions matrix can be viewed (and edited) by entering =%<nop>WEBPERMISSIONS%= anywhere in a topic. You have to have admin rights to view/edit the matrix. The topic permissions UI can be viewed (and edited) by entering =%<nop>TOPICPERMISSIONS%= anywhere in a topic (or accesing it via the 'More topic actions' page). You have to have write permissions to that topic to view/edit the UI. ---+++ =WEBPERMISSIONS= The =WEBPERMISSIONS= TWiki variable accepts the following parameters: * =repeatheads= - if set to a number, headings will be repeated every this number of rows. This is very useful when you have a lot of users and groups. * =webs= - a comma-separated list of webs to show. Default is to show all webs. * =users= - a comma-separated list of users (and groups) to show. Default is to show all users and groups. Both =webs= and =users= lists can use _wildcards_. A star (*) in a name will match any number of characters - so =Brian*= will match all users and groups whose names start with =Brian=. =*Group= will match all users or groups whose name ends in =Group=. If you put a minus sign (-) before a name in either list, then the next expression will be treated as a _filter_ e.g. =-Secret= will _exclude_ the name =Secret= from the list, and =*Group= will exclude all names ending in =Group= from the list. Use the following form to select the subset of webs and users you want to display. If you have admin rights, and the plugin is installed, you will see the matrix below the form: <!-- Copy from HERE --> #PermissionsMatrix <div style="background-color: #ffffdf; padding: 10px"> Select the webs, users and groups you want to change permissions for from the list below. Ctrl+click and Shift+click work as normal.<br /> <form action="%SCRIPTURL{view}%/%WEB%/%TOPIC%#PermissionsMatrix" method="POST"> <select size="7" name="webs" multiple="multiple"> %WEBLIST{format="<option $marker>$name</option>" selection="%URLPARAM{"webs" multiple="on" separator=", "}%"}% </select> <select size="7" name="users" multiple="multiple"> %USERSLIST{format="<option $marker>$wikiname</option>" selection="%URLPARAM{"users" multiple="on" separator=", "}%"}% </select> <br /> <input type="submit" value="Select" class="twikiSubmit" /> </form> %WEBPERMISSIONS{webs="%URLPARAM{"webs" multiple="on" separator="," default="%SYSTEMWEB%,%USERSWEB%,%WEB%"}%" users="%URLPARAM{"users" multiple="on" separator="," default="%USERNAME%"}%" repeatheads="10"}% </div> <!-- TO HERE --> ---+++ =TOPICPERMISSIONS= The topic permissions tool can be viewed (and edited) by entering =%<nop>TOPICPERMISSIONS%= anywhere in a topic. To add an "Edit ACLS" option to the "More topic actions" screen add =webpermissions= to the front of the SKIN setting (e.g. =Set SKIN=webpermissions,pattern=) ---++ Plugin Settings <!-- * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = View and edit web permissions --> By default, the plugin only supports VIEW and CHANGE permissions on webs. You can change the set of access modes handled by the plugin by defining a configuration variable (in !LocalSite.cfg) to be a comma-separated list of access modes. For example, <verbatim> $TWiki::cfg{Plugins}{WebPermissionsPlugin}{modes} = 'VIEW,CHANGE,RENAME'; </verbatim> See %SYSTEMWEB%.TWikiAccessControls for more information on what access modes can be used to control. ---++ Plugin Installation Instructions * For an __automated installation__, run the [[%SCRIPTURL{configure}%][configure]] script and follow "Find More Extensions" in the in the __Extensions__ section. * See the [[http://twiki.org/cgi-bin/view/Plugins/BuildContribInstallationSupplement][installation supplement]] on TWiki.org for more information. * Or, follow these __manual installation__ steps: * Download the ZIP file from the extension home on twiki.org (see below). * Unzip ==%TOPIC%.zip== in your twiki installation directory. * Set the ownership of the extracted directories and files to the webserver user. * Install the dependencies (if any). * Plugin __configuration and testing__: * Run the [[%SCRIPTURL{configure}%][configure]] script and enable the plugin in the __Plugins__ section. * Configure additional plugin settings in the __Extensions__ section if needed. * Test if the installation was successful using the examples provided. To access the Topic Permission editor, add =webpermissions= to the SKIN setting in %USERSWEB%.TWikiPreferences, such as =Set SKIN=webpermissions,pattern= ---++ Plugin Info Many thanks to the following sponsors for supporting this work: * This plugin was developed on behalf of [[http://www.evolvedmedia.com/][Evolved Media]] * Further work supported by [[http://www.spanlink.com/][Spanlink Communications]] | Plugin Author: | TWiki:Main.CrawfordCurrie & TWiki:Main.SvenDowideit | | Copyright: | © 2006, Evolved Media, Spanlink Communications and !WikiRing;%BR% © 2006-2013 TWiki:TWiki.TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 2013-06-18 | | Change History: | <!-- versions below in reverse order --> | | 2013-06-18 | TWikibug:Item7154: Fix anchor issue; fix call to unofficial function -- TWiki:Main.PeterThoeny | | 2012-04-16 | TWikibug:Item6868: Fix for error saving Topic ACLs; XHTML fixes; fix warnings -- TWiki:Main.PeterThoeny | | 2011-03-06 | TWikibug:Item6655: XHTML fixes; Placing checkboxes before checkbox label to be compliant with web standards; better images for %ATTACHURL%/VIEW.gif VIEW.gif and %ATTACHURL%/CHANGE.gif CHANGE.gif -- TWiki:Main.PeterThoeny | | 2011-03-06 | TWikibug:Item6655: Fix for TWiki-5.0 -- TWiki:Main.SzymonSobczyk | | 2010-05-26 | TWikibug:Item6433: Doc improvements -- TWiki:Main.PeterThoeny | | 4 Dec 2007 | TWikibug:Item4901 fixed templates TWikibug:Item5072 added users parameter to select a subset of users/groups in the web permissions interface | | 8 Sep 2007 | Updated for TWiki-4.2.0 | | July 2006 | add Topic ACLs user interface via More topic actions - SvenDowideit@WikiRing.com | | 10216 | TWikibug:Item2291 - Added repeatheads and webs parameters | | 9048 | TWikibug:Item1766 - corrected problems with passing incorrect parameters to setACLs and not interpreting values from the form correctly. | | 8877 | TWikibug:Item1701 - first release | | Dependencies: | <table border="1"><tr><th>Name</th><th>Version</th><th>Description</th></tr><tr><td align="left">TWiki::Plugins</td><td align="left">>=1.10</td><td align="left">TWiki-4</td></tr></table> | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC% | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal | __Related Topics:__ %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
:
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r0 - 2013-06-18
-
TWikiContributor
TWiki
Log In
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
FormattedSearch
QuerySearch
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
Reference Manual
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
External
Main
Sandbox
TWiki
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding ARC TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.WebPermissionsPlugin
.