* Separated the global setup settings from those in the root site's preferences

* Added encoding="form" parameter to most of the macros using the request handler
 * Renamed commentsMode to commentMode (comments_mode to comment_mode in DB)
 * Reactivated notifications in a simplified manner
 * Throw an error in global sendMail() method if arguments are not sufficient
 * Added HopObject.notify() method
 * Added HopObject.kind_macro() method (provides the constructor's name in lowercase)
 * Added Messages.skin containing subskins suited for e-mail output
 * Removed obsolete skin files
 * Added reset_action() method for resetting a user's password to Members prototype
 * Added require() method to Membership prototype; wrapped static require() method around it
 * Added Membership.notify() method which does all the member-related notification stuff
 * Send notification on membership removal
 * Fixed contact form in Membership prototype
 * Dropped e-mail property from Site prototype (users can be contacted via Membership.contact_action(), Root prototype has extra e-mail property)
 * Added missing getPermission() method to User prototype, always requiring a privileged user
This commit is contained in:
Tobi Schäfer 2007-10-15 23:29:03 +00:00
parent 504260650e
commit 3e8c4c6313
34 changed files with 336 additions and 276 deletions

15
code/User/Messages.skin Normal file
View file

@ -0,0 +1,15 @@
<% #reset %>
<% gettext 'Dear {0},
You (or someone pretending to be you) requested to reset the password of your
account for the site {1} at {2}.
Below you find a new password that temporarily will give you access to the site.
Please change the password immediately after your next login.
Your temporary password: {3}
Best regards.
The Management'
<% user.name %> <% site.title %> <% site.href %> <% param.password %> %>

View file

@ -53,6 +53,10 @@ User.prototype.constructor = function(data) {
return this;
};
User.prototype.getPermission = function(action) {
return User.require(User.PRIVILEGED);
};
User.prototype.update = function(data) {
if (!data.digest && data.password) {
data.digest = ((data.password + this.salt).md5() +
@ -147,7 +151,7 @@ User.register = function(data) {
if (!data.email) {
throw new Error(gettext("Please enter your e-mail address."));
}
evalEmail(data.email);
validateEmail(data.email);
// Create hash from password for JavaScript-disabled browsers
if (!data.hash) {