Skip to content

Commit

Permalink
Item13936: Keep backwards compatibiltiy
Browse files Browse the repository at this point in the history
MailerContrib needs to work on systems without the WIKIAGENT* variables.

Also, document the new variable and fix up a couple of other
registration documentation errors.
  • Loading branch information
gac410 committed Nov 15, 2016
1 parent b8a202c commit 3e76036
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MailerContrib/templates/mailnotify.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
%TEXTHEAD%
%TMPL:END%
--------------------------------
%TMPL:DEF{MailNotifyBody}%From: %WIKIAGENTNAME% <%WIKIAGENTEMAIL%>
%TMPL:DEF{MailNotifyBody}%From: %IF{ "defined WIKIAGENTNAME" then="$percntWIKIAGENTNAME$percnt" else="$percntWIKIWEBMASTERNAME$percnt" }% <%IF{ "defined WIKIAGENTEMAIL" then="$percntWIKIAGENTEMAIL$percnt" else="$percntWIKIWEBMASTER$percnt"}%>
To: %EMAILTO%
Subject: %WIKITOOLNAME%.%WEB% - %MAKETEXT{"Automated notification of topic changes"}%
Auto-Submitted: auto-generated
Expand Down
2 changes: 1 addition & 1 deletion MailerContrib/templates/newsletter.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Templates for the mails sent out by mailnotify for newsletters.
}%

%TMPL:DEF{"NEWS:header"}%From: %WIKIAGENTNAME% <%WIKIAGENTEMAIL%>
%TMPL:DEF{"NEWS:header"}%From: %IF{ "defined WIKIAGENTNAME" then="$percntWIKIAGENTNAME$percnt" else="$percntWIKIWEBMASTERNAME$percnt" }% <%IF{ "defined WIKIAGENTEMAIL" then="$percntWIKIAGENTEMAIL$percnt" else="$percntWIKIWEBMASTER$percnt"}%>
To: %EMAILTO%
Subject: %WIKITOOLNAME% %WEB%.%TOPIC%
Auto-Submitted: auto-generated
Expand Down
29 changes: 18 additions & 11 deletions TopicUserMappingContrib/data/System/ManagingUsers.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1457055693" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1479234842" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
%STARTINCLUDE%
---+ Manage Users
Expand Down Expand Up @@ -88,7 +88,7 @@ Prefix for deleted topic: <input type="text" name="topicPrefix" class="foswikiIn

*Note:* Consider leaving the user topic file in place so their past signatures and revision author entries don't end up looking like AnUncreatedTopic.
If you want to make it clear the user is no longer around, replace the topic content with a note to that effect.
The existence of the <nop>UserName topic should also prevent that username from being re-used, sealing the potential security hole regarding inherited permissions..
The existence of the <nop>UserName topic should also prevent that username from being re-used, sealing the potential security hole regarding inherited permissions.

<div class="foswikiHelp">
%T% See the [[http://foswiki.org/Extensions/AntiWikiSpamPlugin][AntiWikiSpamPlugin]] extension for another method of removing users. It provides a =rest= handler to:
Expand All @@ -108,13 +108,15 @@ Registration can be configured to require a verification via the registered emai
* An email is sent to the email address entered by the new user with a confirmation code.
* The user must enter the confirmation code into a dialog on the wiki to confirm the registration.
* The pending registration lifetime defaults to 6 hours. If the user does not confirm within that time, the pending registration will be removed.
* Registration requests pending verification can be viewed by visiting the System.PendingRegistrationsReport

---+++ Administrative approval of new registrations

Registration can be configured to require approval. ={Register}{NeedApproval}=
* If confirmation is enabled, the email address is verified per the steps in the prior paragraph
* An email is then set to the list of Approvers - ={Register}{Approvers}=
* The approver can then Approve or Deny the registration by following a link in the email.
* Registrations awaiting approval can be viewed and approved from the System.PendingRegistrationsReport

---+++ Registration Email Requirements

Expand All @@ -132,7 +134,7 @@ should use a cron job to clean up expired sessions. The standard maintenance cro

Note that if you are using registration approval by 3rd party reviewers, this timer should most likely be significantly increased. 24 hours = 86400, 3 days = 259200.

Pending registration requests are stored in the ={WorkingDir}/registration_approvals= directory.
Pending registration requests are stored in the ={WorkingDir}/registration_approvals= directory, but are no longer in plain text format. To view the pending registrations see the new System.PendingRegistrations report.

---++ Customizing the User Registration pages
If you modify any of the topic related to User Registration, you should put the modified versions into the %USERSWEB% web. This will make it easier to
Expand Down Expand Up @@ -186,17 +188,22 @@ Multiple categories of users can be supported by:
* And configuring the new registration page to use the new user template.

---++ Customizing registration Emails.
Foswiki's Registration can send 6 emails whose output is governed by templates:
| User registration confirmation | =templates/registerconfirm.tmpl= |
| User registration failed notification | =templates/registerfailedremoved.tmpl= |
| User registration denied notification | =templates/registerdenied.tmpl= |
| Approver registration pending notification | =templates/registerapprove.tmpl= |
| User notification of sucessful registraiton | =templates/registernotify.tmpl= |
| Administrator notification of successful registration | =templates/registernotifyadmin.tmpl= |
Foswiki's Registration can send 7 emails whose output is governed by templates:
| User registration confirmation. (Awaiting email verification). | =templates/registerconfirm.tmpl= |
| User registration failed notification, cleanup was successful. | =templates/registerfailedremoved.tmpl= |
| User registration failed notification, cleanup of partial registration also failed. | =templates/registerfailednotremoved.tmpl= |
| User registration denied notification. | =templates/registerdenied.tmpl= |
| Approver registration pending notification. | =templates/registerapprove.tmpl= |
| User notification of sucessful registraiton. | =templates/registernotify.tmpl= |
| Administrator notification of successful registration. | =templates/registernotifyadmin.tmpl= |

As these are SkinTemplates, they can be customized and selected using the SKIN path setting.
Because there are default =.tmpl= files in the =templates= dir, this cannot use Template topics.

Note: As of Foswiki 2.1.3, the email =From:= address can be different from the WIKIWEBMASTER address, and is configurable using the =bin/configure= tool.
See the "Expert" ={WikiAgentName}= and ={WikiAgentEmail}= settings on the "Mail" section, "Basic Settings and Autoconfiguration" tab.
If these fields are not set, then the WIKIWEBMASTER setting will be used as the =From:= address.

These template files have a specific format that matches the raw format of emails sent via SMTP,
so be careful and test your changes. It is easiest to start by copying the default templates that you
wish to change.: (You don't need to copy every template).
Expand All @@ -215,7 +222,7 @@ To make it possible for users to modify the email contents, you could use a para
statement in your customized version, eg:

<verbatim class="tml">
From: %WIKIWEBMASTERNAME% <%WIKIWEBMASTER%>
From: %WIKIAGENTNAME% <%WIKIAGENTEMAIL%>
To: %FIRSTLASTNAME% <%EMAILADDRESS%>
Subject: %MAKETEXT{
"[_1] - Registration for [_2] ([_3])"
Expand Down

0 comments on commit 3e76036

Please sign in to comment.