Update of /var/cvs/src/org/mmbase/datatypes/processors
In directory james.mmbase.org:/tmp/cvs-serv5037

Modified Files:
      Tag: MMBase-1_8
        Creator.java LastModified.java LastModifier.java 
Log Message:
if you may not edit the node, then never mind


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/datatypes/processors


Index: Creator.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/processors/Creator.java,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -b -r1.1 -r1.1.2.1
--- Creator.java        14 Feb 2006 22:46:41 -0000      1.1
+++ Creator.java        15 Jul 2008 10:10:14 -0000      1.1.2.1
@@ -16,7 +16,7 @@
  * to the current user id when this field is not yet set.
  *
  * @author Michiel Meeuwissen
- * @version $Id: Creator.java,v 1.1 2006/02/14 22:46:41 michiel Exp $
+ * @version $Id: Creator.java,v 1.1.2.1 2008/07/15 10:10:14 michiel Exp $
  * @since MMBase-1.8
  * @see   LastModifier
  */
@@ -27,7 +27,7 @@
     private static final long serialVersionUID = 1L;
 
     public void commit(Node node, Field field) {
-        if (node.isNull(field.getName())) {
+        if (node.mayWrite() && node.isNull(field.getName())) {
             node.setValueWithoutProcess(field.getName(), 
node.getCloud().getUser().getIdentifier());
         }
     }


Index: LastModified.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/processors/LastModified.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -b -r1.4 -r1.4.2.1
--- LastModified.java   14 Feb 2006 22:46:41 -0000      1.4
+++ LastModified.java   15 Jul 2008 10:10:14 -0000      1.4.2.1
@@ -17,7 +17,7 @@
  * to the current time when the node is committed. 
  *
  * @author Michiel Meeuwissen
- * @version $Id: LastModified.java,v 1.4 2006/02/14 22:46:41 michiel Exp $
+ * @version $Id: LastModified.java,v 1.4.2.1 2008/07/15 10:10:14 michiel Exp $
  * @since MMBase-1.8
  * @see   LastModifier
  */
@@ -27,8 +27,10 @@
     private static final long serialVersionUID = 1L;
 
     public void commit(Node node, Field field) {
+        if (node.mayWrite()) {
         node.setValueWithoutProcess(field.getName(), new Date());
     }
+    }
 
     public String toString() {
         return "lastmodified";


Index: LastModifier.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/datatypes/processors/LastModifier.java,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -b -r1.4 -r1.4.2.1
--- LastModifier.java   14 Feb 2006 22:46:41 -0000      1.4
+++ LastModifier.java   15 Jul 2008 10:10:14 -0000      1.4.2.1
@@ -16,7 +16,7 @@
  * to the current user id when the node is committed.
  *
  * @author Michiel Meeuwissen
- * @version $Id: LastModifier.java,v 1.4 2006/02/14 22:46:41 michiel Exp $
+ * @version $Id: LastModifier.java,v 1.4.2.1 2008/07/15 10:10:14 michiel Exp $
  * @since MMBase-1.8
  * @see   LastModified
  * @see   Creator
@@ -28,8 +28,10 @@
     private static final long serialVersionUID = 1L;
 
     public void commit(Node node, Field field) {
+        if (node.mayWrite()) {
         
node.setValueWithoutProcess(field.getName(),node.getCloud().getUser().getIdentifier());
     }
+    }
 
     public String toString() {
         return "lastmodifier";
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to