diff --git a/data/System/WebPermissionsPlugin.txt b/data/System/WebPermissionsPlugin.txt index 6672fd7..52a94ad 100644 --- a/data/System/WebPermissionsPlugin.txt +++ b/data/System/WebPermissionsPlugin.txt @@ -8,7 +8,7 @@ * Set Y = * Set N = --> -This plugin provides a centralised interface to TWiki permissions. +This plugin provides a centralised interface to Foswiki 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. @@ -16,11 +16,11 @@ To interactivly edit topic permissions, it adds an "Edit topic ACLs" option to t ---++++ Web Permissions This interface allows you to control - +
Viewing Editing
VIEW = %V% CHANGE = %C% - +
@@ -31,7 +31,7 @@ VIEW = %V% CHANGE = %C% @@ -39,20 +39,20 @@ @@ -72,8 +72,8 @@
AlbumsSinglesReviewsStatistics
AnnieLennox%V%%C%%V%%C%%V%%C%%V%
BillyBragg %V%%V%%V%
VIEW = %V% CHANGE = %C% - +
@@ -63,8 +63,8 @@ The plugin tries very hard to keep the permissions specification you started wit + + + +
AlbumsSinglesReviewsStatistics
AnnieLennox %V%%Y% %C%%Y%%V%%Y%%C%%Y%%V%%Y%%C%%Y%%V%%Y%%C%%N%
BillyBragg %V%%Y%%C%%N%%V%%Y%%C%%N%%V%%Y%%C%%N%%V%%N%%C%%N%
- -

Editors

- - + +
- -

Viewers

- -         + +        

-*THIS PLUGIN REQUIRES TWiki-4.0.0 or later* - ---++ Syntax Rules The web permissions matrix can be viewed (and edited) by entering =%WEBPERMISSIONS%= anywhere in a topic. @@ -114,7 +112,7 @@ You have to have write permissions to that topic to view/edit the UI. ---+++ =WEBPERMISSIONS= -The =WEBPERMISSIONS= TWiki variable accepts the following parameters: +The =WEBPERMISSIONS= TML 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. @@ -152,7 +150,7 @@ To add an "Edit ACLS" option to the "More topic actions" screen add =webpermis --> 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, -$TWiki::cfg{Plugins}{WebPermissionsPlugin}{modes} = 'VIEW,CHANGE,RENAME'; +$Foswiki::cfg{Plugins}{WebPermissionsPlugin}{modes} = 'VIEW,CHANGE,RENAME'; See %SYSTEMWEB%.AccessControl for more information on what access modes can be used to control. @@ -166,17 +164,18 @@ e.g. =Set SKIN=webpermissions,pattern=) ---++ Plugin Info -Another great TWiki extension from the *WikiRing* - working together to improve your wiki experience! +Another great Foswiki extension from the *WikiRing* - working together to improve your wiki experience! Many thanks to the following sponsors for supporting this work: * This plugin was developed on behalf of Evolved Media Network * Further work supported by [[http://www.spanlink.com/][Spanlink Communications]] -| Plugin Author: | TWiki:Main.CrawfordCurrie & TWiki:Main.SvenDowideit, http://wikiring.com | +| Plugin Author: | Foswiki:Main.CrawfordCurrie & :Main.SvenDowideit, http://wikiring.com | | Copyright: | © 2006, Evolved Media Network, Spanlink Communications and WikiRing | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | %$VERSION% | | Change History: | | +| March 2009 | ported to Foswiki | | 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 | @@ -184,7 +183,6 @@ Many thanks to the following sponsors for supporting this work: | 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: | %$DEPENDENCIES% | -| Demo Url: | http://demo.wikiring.com/twiki/bin/view/Demo/TopicPermissionsDemo | | Plugin Home: | http://foswiki.org/Extensions/%TOPIC% | | Feedback: | http://foswiki.org/Extensions/%TOPIC%Dev | | Appraisal: | http://foswiki.org/Extensions/%TOPIC%Appraisal | diff --git a/lib/Foswiki/Plugins/WebPermissionsPlugin.pm b/lib/Foswiki/Plugins/WebPermissionsPlugin.pm index 2d4d861..8d9c565 100755 --- a/lib/Foswiki/Plugins/WebPermissionsPlugin.pm +++ b/lib/Foswiki/Plugins/WebPermissionsPlugin.pm @@ -16,7 +16,7 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# For licensing info read LICENSE file in the TWiki root. +# For licensing info read LICENSE file in the Foswiki root. # # Author: Crawford Currie http://c-dot.co.uk # diff --git a/lib/Foswiki/Plugins/WebPermissionsPlugin/Core.pm b/lib/Foswiki/Plugins/WebPermissionsPlugin/Core.pm index 0486078..a413e15 100644 --- a/lib/Foswiki/Plugins/WebPermissionsPlugin/Core.pm +++ b/lib/Foswiki/Plugins/WebPermissionsPlugin/Core.pm @@ -16,9 +16,10 @@ # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -# For licensing info read LICENSE file in the TWiki root. +# For licensing info read LICENSE file in the Foswiki root. # # Author: Crawford Currie http://c-dot.co.uk +# Author: Sven Dowideit http://fosiki.com # Author: Eugen Mayer http://impressimpressive-media.de # # This plugin helps with permissions management by displaying the web @@ -30,7 +31,7 @@ use strict; # BUGO: because WEBPERMISSIONS is using the same view to change and display, # updated ACL's do not apply to this view. -# TWiki has already loaded the permissions that it is using, and some +# Foswiki has already loaded the permissions that it is using, and some # random plugins have already processed things based on the ACLs prior to # the users change. THIS IS HORRIGIBILE # IMO it needs to be either rest or save, though i'm going to lean to rest @@ -107,7 +108,7 @@ sub WEBPERMISSIONS { } } - $tab .= CGI::start_table( { border => 1, class => 'twikiTable' } ); + $tab .= CGI::start_table( { border => 1, class => 'foswikiTable' } ); my $repeat_heads = $params->{repeatheads} || 0; my $repeater = 0; @@ -142,10 +143,10 @@ sub WEBPERMISSIONS { $tab .= CGI::end_table(); if( $editing ) { - $tab .= CGI::submit( -name => 'web_permissions_action', -value => 'Save', -class => 'twikiSubmit'); - $tab .= CGI::submit( -name => 'web_permissions_action', -value => 'Cancel', -class => 'twikiSubmit' ); + $tab .= CGI::submit( -name => 'web_permissions_action', -value => 'Save', -class => 'foswikiSubmit'); + $tab .= CGI::submit( -name => 'web_permissions_action', -value => 'Cancel', -class => 'foswikiSubmit' ); } else { - $tab .= CGI::submit( -name => 'web_permissions_action', -value => 'Edit', -class => 'twikiSubmit' ); + $tab .= CGI::submit( -name => 'web_permissions_action', -value => 'Edit', -class => 'foswikiSubmit' ); } my $page = CGI::start_form( -method => 'POST', @@ -389,7 +390,7 @@ sub _getListOfGroups { @list = map { $_->wikiName() } @{$session->{users}->getAllGroups()}; } else { - # This code assumes we are using TWiki topic based Group mapping + # This code assumes we are using Foswiki topic based Group mapping $session->{search}->searchWeb( _callback => sub { my $ref = shift; diff --git a/lib/Foswiki/Plugins/WebPermissionsPlugin/DEPENDENCIES b/lib/Foswiki/Plugins/WebPermissionsPlugin/DEPENDENCIES index d8a9a2e..139597f 100644 --- a/lib/Foswiki/Plugins/WebPermissionsPlugin/DEPENDENCIES +++ b/lib/Foswiki/Plugins/WebPermissionsPlugin/DEPENDENCIES @@ -1,3 +1,2 @@ -TWiki::Plugins,>=1.10,perl,TWiki-4 diff --git a/pub/System/WebPermissionsPlugin/WebPermissionsPlugin.js b/pub/System/WebPermissionsPlugin/WebPermissionsPlugin.js index e1c83d2..b1e792b 100755 --- a/pub/System/WebPermissionsPlugin/WebPermissionsPlugin.js +++ b/pub/System/WebPermissionsPlugin/WebPermissionsPlugin.js @@ -16,20 +16,20 @@ # */ -//create the TWiki namespace if needed -if ( typeof( TWiki ) == "undefined" ) { - TWiki = {}; +//create the Fowsiki namespace if needed +if ( typeof( ) == "undefined" ) { + = {}; } /**********************************************************************************/ -//create the TWiki.WebPermissionsPlugin namespace if needed -if ( typeof( TWiki.WebPermissionsPlugin ) == "undefined" ) { - TWiki.WebPermissionsPlugin = {}; +//create the Foswiki.WebPermissionsPlugin namespace if needed +if ( typeof( Foswiki.WebPermissionsPlugin ) == "undefined" ) { + Foswiki.WebPermissionsPlugin = {}; } //moveSelectionTo(event, 'topiceditors', 'allusersandgroups') -TWiki.WebPermissionsPlugin.moveSelectionTo = function(event, fromSelectName, toSelectName) { +Foswiki.WebPermissionsPlugin.moveSelectionTo = function(event, fromSelectName, toSelectName) { var buttonTarget = (event.target) ? event.target : event.srcElement; var fromSelect = buttonTarget.form.elements.namedItem(fromSelectName); @@ -54,20 +54,20 @@ TWiki.WebPermissionsPlugin.moveSelectionTo = function(event, fromSelectName, toS } } -//the namespace makes TWiki decide its a web.topic to be rendered as a url +//the namespace makes Foswiki decide its a web.topic to be rendered as a url prepareForSave = function(event) { - return TWiki.WebPermissionsPlugin.prepareForSave(event); + return Foswiki.WebPermissionsPlugin.prepareForSave(event); } //return false cancels the submit -TWiki.WebPermissionsPlugin.prepareForSave = function(event) { +Foswiki.WebPermissionsPlugin.prepareForSave = function(event) { //, 'topiceditors', 'topicviewers', 'disallowedusers' var buttonTarget = (event.target) ? event.target : event.srcElement; var userInEditorsList = false; var selectObj = buttonTarget.form.elements.namedItem('topiceditors'); for (i=0; i< selectObj.options.length; i++) { - if (selectObj.options[i].value == TWiki.UsersWikiName) { + if (selectObj.options[i].value == Foswiki.UsersWikiName) { userInEditorsList = true; } if (selectObj.options[i].changed == 'changed') { diff --git a/templates/webpermissionsplugin.topichtml.tmpl b/templates/webpermissionsplugin.topichtml.tmpl index 12840b0..486aec3 100755 --- a/templates/webpermissionsplugin.topichtml.tmpl +++ b/templates/webpermissionsplugin.topichtml.tmpl @@ -16,10 +16,10 @@
- - - -
- -
- -         + +        
diff --git a/templates/webpermissionsplugin.topicjavascript.tmpl b/templates/webpermissionsplugin.topicjavascript.tmpl index d0e4288..3b172cb 100755 --- a/templates/webpermissionsplugin.topicjavascript.tmpl +++ b/templates/webpermissionsplugin.topicjavascript.tmpl @@ -1,5 +1,5 @@