Skip to content

Commit

Permalink
Item1156: Create Release01x00 branch
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x00@2735 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Feb 26, 2009
1 parent 7b7071b commit 8b1868a
Show file tree
Hide file tree
Showing 33 changed files with 3,238 additions and 0 deletions.
31 changes: 31 additions & 0 deletions TopicUserMappingContrib/data/Main/AdminGroup.txt
@@ -0,0 +1,31 @@
%META:TOPICINFO{author="ProjectContributor" date="1111931141" format="1.0" version="$Rev: 15508 $"}%
---+ Administrator Group


* Member list (comma-separated list):
* Set GROUP =
* Persons/group who can change the list:
* Set ALLOWTOPICCHANGE = AdminGroup

%INCLUDE{"%USERSWEB%.AdminUser" section="sudo_login"}%

%IF{"(NOT defined GROUP) OR $GROUP = ''" then="" else="<!--"}%
<sticky><div style="background-color:yellow"></sticky>
*How to add the first administrator* %BR%
If you haven't previously set up an administrator, follow these steps:
1 Authenticate as the internal administrator:
* %ADMINLOGIN%
1 Edit this topic
1 Insert the wikinames of admin users in the Administrator Group by listing them in the GROUP setting %BR% (example =* Set GROUP = <nop>JohnSmith, <nop>JamesBond=)
1 Save this topic
1 [[%LOGOUTURL%][Logout]] from the Internal AdminUser
1 Verify that new members show up properly in the group listing at [[%USERSWEB%.Groups]]
1 Make sure always to keep this topic write protected by keeping the already defined ALLOWTOPICCHANGE setting
1 The ALLOWTOPICHANGE and ALLOWTOPICRENAME settings in [[%SYSTEMWEB%.DefaultPreferences]] and [[%LOCALSITEPREFS%]] have already been set to this group (<nop>AdminGroup), restricting edit of site-wide preferences to the Wiki Administrator Group
<sticky></div></sticky>
%IF{"(NOT defined GROUP) OR $GROUP = ''" then="" else="-->"}%

---
*Related topics:* [[%WIKIUSERSTOPIC%]], [[AdminUser]], [[WikiGroups]], [[%SYSTEMWEB%.AccessControl][AccessControl]]


10 changes: 10 additions & 0 deletions TopicUserMappingContrib/data/Main/GroupTemplate.txt
@@ -0,0 +1,10 @@
%META:TOPICINFO{author="ProjectContributor" date="1111931141" format="1.0" version="$Rev: 16686 $"}%
---+!! <nop>%URLPARAM{"topic"}%

* Member list (comma-separated list):
* Set GROUP = %WIKIUSERNAME%
* Persons/group who can change the list:
* Set ALLOWTOPICCHANGE = %URLPARAM{"topic"}%

*%MAKETEXT{"Related topics:"}%* [[%SYSTEMWEB%.AccessControl][AccessControl]]

11 changes: 11 additions & 0 deletions TopicUserMappingContrib/data/Main/NobodyGroup.txt
@@ -0,0 +1,11 @@
%META:TOPICINFO{author="ProjectContributor" date="1111931141" format="1.0" version="$Rev: 16686 $"}%
---+ Nobody Group

* Member list:
* Set GROUP =
* Persons/group who can change the list:
* Set ALLOWTOPICCHANGE = AdminGroup

Used to prevent dangerous actions e.g. renaming [[%SYSTEMWEB%.DefaultPreferences][DefaultPreferences]] - put !NobodyGroup as the only group allowed to rename a topic and it can't be renamed.

*Related topics:* [[%WIKIUSERSTOPIC%]], [[WikiGroups]], [[%SYSTEMWEB%.AccessControl][AccessControl]]
8 changes: 8 additions & 0 deletions TopicUserMappingContrib/data/Main/RegistrationAgent.txt
@@ -0,0 +1,8 @@
%META:TOPICINFO{author="ProjectContributor" date="1111931141" format="1.0" version="$Rev: 16686 $"}%
---+ The <nop>RegistrationAgent User

This is a user used by Foswiki when it registers new users. This user has special access to write to [[%WIKIUSERSTOPIC%]], and does not need an entry in the password system.

*Related topics:* [[%WIKIUSERSTOPIC%]], [[%SYSTEMWEB%.UserRegistration][UserRegistration]]

%META:PREFERENCE{name="ALLOWTOPICCHANGE" title="ALLOWTOPICCHANGE" type="Set" value="AdminGroup"}%
16 changes: 16 additions & 0 deletions TopicUserMappingContrib/data/Main/UserHomepageHeader.txt
@@ -0,0 +1,16 @@
%META:TOPICINFO{author="ProjectContributor" date="1143332901" format="1.1" version="$Rev$"}%
---+ Header of User Homepages

*Note:* This is a maintenance topic, used by the Wiki administrator.

The part between the horizontal rules gets included at the top of every [[%WIKIUSERSTOPIC%]] homepage. The header can be customized to the needs of your organization. For example, show all frequently used fields from the [[%SYSTEMWEB%.UserForm][UserForm]] on top, followed by a personalized portal. The portal can pull content from other places, such as headline news by department, a list of current projects, etc.

-----
%STARTINCLUDE%
%SEARCH{ "%BASETOPIC%" scope="topic" topic="%BASETOPIC%" nonoise="on" format="---+!! $formfield(FirstName) $formfield(LastName)$n()$n()| Organization: | <b> $formfield(OrganisationName) </b> |&nbsp;| Country: | <b> $formfield(Country) </b> |&nbsp;| Location: | <b> $formfield(Location) </b> |$n()| Telephone: | <b> $formfield(Telephone) </b> |&nbsp;| E-mail: | <b> $formfield(Email) </b> |" }%
%TOC%
%STOPINCLUDE%

---
*Related topics:* [[%WIKIUSERSTOPIC%]], [[%SYSTEMWEB%.UserForm][UserForm]], [[%SYSTEMWEB%.NewUserTemplate][NewUserTemplate]], [[%SYSTEMWEB%.UserRegistration][UserRegistration]], [[%SYSTEMWEB%.DataForms][DataForms]]

6 changes: 6 additions & 0 deletions TopicUserMappingContrib/data/Main/UserList.txt
@@ -0,0 +1,6 @@
%META:TOPICINFO{author="ProjectContributor" date="1163619832" format="1.0" version="$Rev: 15206 $"}%
---+ User List sorted by name

%INCLUDE{"UserListHeader"}%

%SEARCH{"form.name~'*UserForm'" nosearch="on" type="query" header="| *FirstName* | *LastName* | *Organization* | *State* | *Country* |" format="| [[$topic][$formfield(FirstName)]] | [[$topic][$formfield(LastName)]] | $formfield(OrganisationName) | $formfield(State) | $formfield(Country) |" excludetopic="Web*, *Template"}%
7 changes: 7 additions & 0 deletions TopicUserMappingContrib/data/Main/UserListByDateJoined.txt
@@ -0,0 +1,7 @@
%META:TOPICINFO{author="ProjectContributor" date="1163619832" format="1.0" version="$Rev: 15206 $"}%
---+ User List sorted by date joined / updated

%INCLUDE{"UserListHeader"}%

%TABLE{initsort="1" initdirection="up"}%
%SEARCH{"form.name~'*UserForm'" type="query" header="| *Date joined* | *Last updated* | *FirstName* | *LastName* | *Organization* | *Country* |" format="| $createdate | $date | [[$topic][$formfield(FirstName)]] | [[$topic][$formfield(LastName)]] | $formfield(OrganisationName) | $formfield(Country) |" excludetopic="Web*, *Template" nosearch="on"}%
7 changes: 7 additions & 0 deletions TopicUserMappingContrib/data/Main/UserListByLocation.txt
@@ -0,0 +1,7 @@
%META:TOPICINFO{author="ProjectContributor" date="1163619832" format="1.0" version="$Rev: 15206 $"}%
---+ User List sorted by location

%INCLUDE{"UserListHeader"}%

%TABLE{initsort="1"}%
%SEARCH{"form.name~'*UserForm'" type="query" header="|*Country* | *State* | *FirstName* | *LastName* | *Organization* |" format="| $formfield(Country) | $formfield(State) | [[$topic][$formfield(FirstName)]] | [[$topic][$formfield(LastName)]] | $formfield(OrganisationName) |" excludetopic="Web*, *Template" nosearch="on" order="formfield(Country)"}%
2 changes: 2 additions & 0 deletions TopicUserMappingContrib/data/Main/UserListHeader.txt
@@ -0,0 +1,2 @@
%META:TOPICINFO{author="ProjectContributor" date="1127307283" format="1.1" version="$Rev$"}%
*Related topics:* %SEARCH{"name='WikiUsers' OR name='WikiGroups' OR name='UserList' OR name~'UserListBy*'" type="query" web="%USERSWEB%" scope="topic" separator=", " nonoise="on" format="[[$web.$topic][$topic]]" excludetopic="%INCLUDINGTOPIC%"}%
105 changes: 105 additions & 0 deletions TopicUserMappingContrib/data/System/BulkRegistration.txt
@@ -0,0 +1,105 @@
%META:TOPICINFO{author="ProjectContributor" date="1111929255" format="1.0" version="$Rev: 16363 $"}%
%META:TOPICPARENT{name="ManagingUsers"}%
---+ Bulk Registration

Administrators can use this topic to register (i.e. create logins and user topics) for a group of people in one batch.

Unlike normal registration the administrator is assumed to have correct e-mail addresses for the users, so *no verification is required.*
Note that the new users are not notified that they have an account. This is so you can prepare and verify the accounts before announcing them.
To announce them use the [[BulkResetPassword]] feature: this will assign a new random password and notify users.

---++ Bulk Registration usage
Note: this is an administrator job - only admistrators can run this.

If you are administrator, you will take these actions:
1 (First time use) Create new bulk registration topics (see [[#Settings][Settings]] below).
1 In the REGISTERTOPIC topic: create a table of new users. An example table is provided below to copy.
1 Return to this topic and press the button "Bulk Register" to create the new topics.
1 Read %LOGTOPIC% to verify if all has gone well.
1 When you are ready, use the [[BulkResetPassword]] page to assign passwords and notify the users of their new accounts.

Below are the details.

---++ Settings
* Define where to pick up the table of users to register
* Set REGISTERTOPIC = %USERSWEB%.UnprocessedRegistrations
* Use this to define where to log the bulk registration process. It needs
to be a topic name in this web.
* Set LOGTOPIC = %REGISTERTOPIC%Log
* Set this to 1 to make the bulk registration overwrite any existing user
topics. By default, existing user topics are left alone.
* Set OVERWRITEHOMETOPICS = 0

---++ The user table
This table is a template for user data that will be written to the new user topics. If you stick to these basic fields you can just use the first example below. If you want to write more data (like phone number or country) read the section [[#CustomizingUserData][Customizing user data]] as well.

---+++ Example format
The following should be inserted into your %REGISTERTOPIC% as a table. This is the most simple format:
<verbatim>
<noautolink>
%EDITTABLE{}%
| FirstName | LastName | Email | WikiName |
| Test | User | you@example.com | TestUser |
</noautolink>
</verbatim>

*Usage:*
1 Copy this text to your clipboard
1 Click through and paste this on %REGISTERTOPIC%.
1 Add and customize entries, save table. Note that the first row must not contain bolded entries, so don't apply any formatting.
1 Return here

#CustomizingUserData
---+++ Customizing user data

You can write additional data to the new user topics. Do this by enhancing the user table with additional field names as table headers.

Any fields you define in this table will end up in the User's topic. If a form (such as %SYSTEMWEB%.UserForm) is attached to NewUserTemplate then the data will go in as META:FIELDS, meaning that you can use SEARCH formfield constructs to search.

If you use the %SYSTEMWEB%.UserForm then ensure that it contains all the fields you define here. Otherwise they will disappear when the user edits their home topic!

---++++ Mandatory fields
* !WikiName
* !FirstName
* !LastName

---++++ Optional fields
* LoginName - if not set will register with WikiName

---++++ Customized table example
Make sure that the extra fields also appear on the %SYSTEMWEB%.UserForm.
<verbatim>
<noautolink>
%EDITTABLE{}%
| FirstName | LastName | Email | WikiName | CustomFieldThis | SomeOtherRandomField | WhateverYouLike |
| Test | User | you@example.com | TestUser | A | B | C |
</noautolink>
</verbatim>

---
%IF{
"context passwords_modifyable"
then=""
else="<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong><br />"
}%
<!--
* Set NOTMODIFYABLE = %IF{"context passwords_modifyable" then="" else="DISABLED"}%
-->
<form name="bulkRegister" action="%SCRIPTURLPATH{"manage"}%/%REGISTERTOPIC%" method="post">
<input type="hidden" name="action" value="bulkRegister" />&nbsp;
<input %NOTMODIFYABLE% type="submit" class="foswikiSubmit" value="Bulk Register these people" />
<input type="hidden" name="LogTopic" value="%LOGTOPIC%" />
<input type="hidden" name="OverwriteHomeTopics" value="%OVERWRITEHOMETOPICS%" />
</form>

---++ <nop>%REGISTERTOPIC%

%INCLUDE{"%REGISTERTOPIC%" warn="off"}%


---++ <nop>%LOGTOPIC%

%INCLUDE{"%LOGTOPIC%" warn="off"}%

---
*Related Topics:* AdminToolsCategory
53 changes: 53 additions & 0 deletions TopicUserMappingContrib/data/System/BulkResetPassword.txt
@@ -0,0 +1,53 @@
%META:TOPICINFO{author="ProjectContributor" date="1111929255" format="1.0" version="$Rev: 15703 $"}%
---+ Bulk Reset Passwords

*Administrators can use this topic to reset any number of user passwords.*

Users whose passwords are reset with this will be sent an e-mail at the address recorded *in their home topic*. The administrator will *not* be told the new passwords.

*Follow these two steps:*

<form action="%SCRIPTURLPATH{"manage"}%/%WEB%/%TOPIC%" method="post">
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
---+++ Select users
%IF{
"context passwords_modifyable"
then=""
else="<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong>"
}%
<!--
* Set NOTMODIFYABLE = %IF{"context passwords_modifyable" then="" else="DISABLED"}%
-->
%TABLE{databg="transparent" tableborder="0" tablerules="none"}%
%SEARCH{
"form.name ~ '*.UserForm'"
web="%USERSWEB%"
type="query"
header="|*WikiName* |*User page created* |*User page changed* | *Reset* |"
format="| $web.$topic |$createdate |$date | <input %NOTMODIFYABLE% type='checkbox' name='LoginName' value='$topic'> |"
excludetopic="Web*" nosearch="on" nototal="on"
}%

*Note* if you don't see all the users you expect in this table, make sure their home topic has an attached %SYSTEMWEB%.UserForm. This is used to identify users.
</div>
<div class="foswikiFormStep">
---+++ Write message

*This text will be sent to users in their "reset" e-mail.* The login name and password will be filled in automatically.
<textarea class="foswikiInputField" name="Introduction" rows="4" cols="70" style="width:99%;">
Welcome! The site is ready for your use. Please use the login name and password listed below and contact me if you have any questions.
</textarea>
</div>
<div class="foswikiFormStep foswikiLast">
<input type="hidden" name="action" value="resetPassword">
<input %NOTMODIFYABLE% type="submit" class="foswikiSubmit" value="Reset selected user passwords and send message">
</div>
</div>
</form>

---
*Related Topics:* AdminToolsCategory

* Set ALLOWTOPICVIEW = %USERSWEB%.AdminGroup
* Set ALLOWTOPICCHANGE = %USERSWEB%.AdminGroup
53 changes: 53 additions & 0 deletions TopicUserMappingContrib/data/System/ChangeEmailAddress.txt
@@ -0,0 +1,53 @@
%META:TOPICINFO{author="ProjectContributor" date="1111929255" format="1.0" version="$Rev: 8235 $"}%
---+ Change E-mail Address
%STARTINCLUDE%

<strong>%MAKETEXT{"This form is used to change your registered e-mail addresses. Your registered e-mails are used by Foswiki for sending you e-mails, include notifications of password changes. The addresses you register via this form are kept secret and will *not* be published anywhere on this site."}%</strong>

%X% *Security Note*: %MAKETEXT{"You really ought to register a valid e-mail address. If Foswiki can't find a registered e-mail for you in the secret database, it will look in your user topic for a line like this:"}%
<verbatim>
* Set Email = user@example.com
</verbatim>
%MAKETEXT{"If your user topic is not protected from changes by other people, and you don't register an e-mail address using this form, then your user account could be hijacked by someone else."}%

%MAKETEXT{"If your old e-mail addresses are all invalid (you can't receive mail there any more) and you have forgotten your password, please contact [_1] for help." args="%WIKIWEBMASTER%"}%

<form name="manage" action="%SCRIPTURLPATH{"manage"}%/%WEB%/%TOPIC%" method="post">
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
%IF{
"context passwords_modifyable"
then="*%MAKETEXT{"After submitting this form your e-mail will be changed, and you will be returned to this form."}%*"
else="<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong>"
}%
<!--
* Set NOTMODIFYABLE = %IF{"context passwords_modifyable" then="" else="DISABLED"}%
-->
</div>
<div class="foswikiFormStep">
Registered e-mail addresses for currently logged in user (=%USERINFO{format="$wikiname"}%=): %USERINFO{format="$emails"}%
</div>
<div class="foswikiFormStep">
%TABLE{databg="transparent" tableborder="0" tablerules="none"}%
| | %MAKETEXT{"Fields marked [_1] are required" args="=<font color='red'>**</font>="}% |
| %MAKETEXT{"Your [_1].LoginName" args="%SYSTEMWEB%"}%: | <input %NOTMODIFYABLE% type="text" name="username" value="%URLPARAM{"username" default="%USERNAME%"}%" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
| %MAKETEXT{"Password"}%: | <input %NOTMODIFYABLE% type="password" name="oldpassword" value="%URLPARAM{oldpassword}%" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
| %MAKETEXT{"New e-mails (space-separated list)"}%: | <input %NOTMODIFYABLE% type="text" name="email" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
</div>
<div class="foswikiFormStep foswikiLast">
<input type="hidden" name="TopicName" value="%TOPIC%" />
<input type="hidden" name="action" value="changePassword" />
<input %NOTMODIFYABLE% type="submit" class="foswikiSubmit" value="Change e-mail address" />
</div><!-- /foswikiFormStep-->
</div><!-- /foswikiFormSteps-->
</form>

<div class="foswikiHelp">
* %ICON{info}% %MAKETEXT{"If you have any questions, please contact [_1]" args="%WIKIWEBMASTER%"}%
* %ICON{info}% %MAKETEXT{"[_1] has a list of other Foswiki users" args="%USERSWEB%.%WIKIUSERSTOPIC%"}%
</div>

%STOPINCLUDE%

---
*%MAKETEXT{"Related topics:"}%* ChangePassword, ResetPassword, UserToolsCategory, AdminToolsCategory
47 changes: 47 additions & 0 deletions TopicUserMappingContrib/data/System/ChangePassword.txt
@@ -0,0 +1,47 @@
%META:TOPICINFO{author="ProjectContributor" date="1111929255" format="1.0" version="$Rev: 16822 $"}%
---+ %MAKETEXT{"Change Password"}%
%STARTINCLUDE%

*%MAKETEXT{"Forgotten your password?"}%* %MAKETEXT{"Use [_1] instead." args="ResetPassword"}%

<form name="manage" action="%SCRIPTURLPATH{"manage"}%/%SYSTEMWEB%/%HOMETOPIC%" method="post">
<div class="foswikiFormSteps">
<div class="foswikiFormStep">
%IF{
"context passwords_modifyable"
then="<strong>%MAKETEXT{"After submitting this form your password will be changed."}%</strong>"
else="<strong>%MAKETEXT{"Sorry, the password system is currently read only, please contact [_1]" args="%WIKIWEBMASTER%"}%</strong>"
}%
<!--
* Set NOTMODIFYABLE = %IF{"context passwords_modifyable" then="" else="DISABLED"}%
-->
</div>
<div class="foswikiFormStep">
%TABLE{databg="transparent" tableborder="0" tablerules="none"}%
|%MAKETEXT{"Fields marked [_1] are required" args="=<font color='red'>**</font>="}% ||
| %MAKETEXT{"Your [_1].LoginName" args="%SYSTEMWEB%"}%: | <input %NOTMODIFYABLE% type="text" name="username" value="%URLPARAM{"username" default="%USERNAME%"}%" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
| %MAKETEXT{"Current password"}%: | <input %NOTMODIFYABLE% type="password" name="oldpassword" value="%URLPARAM{oldpassword}%" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
| %MAKETEXT{"New password"}%: | <input %NOTMODIFYABLE% type="password" name="password" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
| %MAKETEXT{"Retype new password"}%: | <input %NOTMODIFYABLE% type="password" name="passwordA" size="40" class="foswikiInputField" /> =<font color="red">**</font>= |
</div>
<div class="foswikiFormStep foswikiLast">
<input type="hidden" name="TopicName" value="%TOPIC%" />
<input type="hidden" name="action" value="changePassword" />
<input %NOTMODIFYABLE% type="submit" class="foswikiSubmit" value="%MAKETEXT{"Change password"}%" />
</div><!-- /foswikiFormStep-->
</div><!-- /foswikiFormSteps-->
</form>

<div class="foswikiHelp">
* %ICON{info}% %MAKETEXT{"If you have any questions, please contact [_1]" args="%WIKIWEBMASTER%"}%
* %ICON{info}% %MAKETEXT{"[_1] has a list of other Foswiki users" args="%USERSWEB%.%WIKIUSERSTOPIC%"}%
</div>

%STOPINCLUDE%

---
*%MAKETEXT{"Related topics:"}%* ResetPassword, ChangeEmailAddress, UserToolsCategory, AdminToolsCategory

<!--
* Set DENYTOPICVIEW = WikiGuest
-->
26 changes: 26 additions & 0 deletions TopicUserMappingContrib/data/System/LoginName.txt
@@ -0,0 +1,26 @@
%META:TOPICINFO{author="ProjectContributor" date="1158277691" format="1.0" version="$Rev: 15569 $"}%
%META:TOPICPARENT{name="ChangePassword"}%
---+ The name you log in with

A login name is a sequence of alphanumeric characters and underscores.

You cannot alter your !LoginName: you have to get the administrator to do this for you.

---++ How to Find Yours

Look in %USERSWEB%.WikiUsers - if your name is followed by a dash and a word, usually lowercase, this is what you log in with.

e.g.

* !WikiGuest - guest - 05 Sep 2004

Would mean that !WikiGuest would log in using the login name 'guest'

If, on the other hand, if your entry is like this:

* !WikiGuest - 05 Sep 2004

Then you would log in using your WikiName, in this case 'WikiGuest'

---
*Related Topics for Administrators:* ManagingUsers, UserDocumentationCategory

0 comments on commit 8b1868a

Please sign in to comment.