arturobernalg opened a new pull request, #565: URL: https://github.com/apache/jspwiki/pull/565
First part of [JSPWIKI-90](https://issues.apache.org/jira/browse/JSPWIKI-90): the server side. The subscribe button follows in a separate change. A new `SubscriptionManager` keeps the pages a user is subscribed to in an attribute of the user profile, so it is stored by the configured user database and needs no new storage. `DefaultSubscriptionManager` listens to `POST_SAVE_END` and sends a mail to each subscriber that has an e-mail address, from a single background thread so that saving a page never waits for the mail server. The mail contains the page name, the author and a link, not the text of the page. Pages with an ACL on the view permission are not notified, since the view permission of an offline user cannot be evaluated there. The links need the scheme and host, so there is a new optional property `jspwiki.subscription.baseURL`; without it the link is the path only. The message is translated in all the template languages. Tests: `DefaultSubscriptionManagerTest` (6 tests) covers subscribe, unsubscribe and persistence, and receives the real mail on a test SMTP server, including the case of a page with a restricted view and of a subscriber without e-mail. The whole jspwiki-main suite passes (940 tests). This is a new implementation. The code attached to the issue by Ulf Dittmer is not used. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
