Author: michiel
Date: 2010-04-09 16:02:48 +0200 (Fri, 09 Apr 2010)
New Revision: 41821
Modified:
mmbase/branches/MMBase-1_9/applications/email/src/main/java/org/mmbase/datatypes/VerifyEmailProcessor.java
Log:
added 'onlyForSelf' setting
Modified:
mmbase/branches/MMBase-1_9/applications/email/src/main/java/org/mmbase/datatypes/VerifyEmailProcessor.java
===================================================================
---
mmbase/branches/MMBase-1_9/applications/email/src/main/java/org/mmbase/datatypes/VerifyEmailProcessor.java
2010-04-09 13:50:31 UTC (rev 41820)
+++
mmbase/branches/MMBase-1_9/applications/email/src/main/java/org/mmbase/datatypes/VerifyEmailProcessor.java
2010-04-09 14:02:48 UTC (rev 41821)
@@ -83,7 +83,14 @@
private String url = "/mmbase/email/verify/";
private String includeUrl = null; //"/core/mail.jsp";
+ private boolean onlyForSelf = false;
+
+ public void setOnlyForSelf(boolean o) {
+ onlyForSelf = o;
+ }
+
+
public void setEmailField(String ef) {
emailField = ef;
}
@@ -238,6 +245,7 @@
node.commit();
return node;
}
+ log.service("Not Found " + query.toSql());
return null;
}
@@ -250,6 +258,19 @@
if (log.isDebugEnabled()) {
log.debug("Commit for " + node + " " + emailField + " " +
node.getChanged());
}
+ if (onlyForSelf) {
+ try {
+ int myNode =
node.getCloud().getCloudContext().getAuthentication().getNode(node.getCloud().getUser());
+ log.debug("Comparing " + node.getNumber() + " with " + myNode);
+ if (myNode != node.getNumber()) {
+ log.debug("Logged in a someone different. Ignoring");
+ return;
+ }
+ } catch (UnsupportedOperationException uoe) {
+ log.debug(uoe);
+ return;
+ }
+ }
if ((node.getChanged().contains(emailField) && !
node.getChanged().contains(field.getName())) || node.isNew()) {
String email = node.getStringValue(emailField);
if ("".equals(email)) {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs