Update of 
/var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders
In directory james.mmbase.org:/tmp/cvs-serv27578

Modified Files:
      Tag: MMBase-1_8
        Contexts.java 
Log Message:
The node can be requested from the user object, which is beter in case the 
usercontext object was a 'local admin' (of which the username could coincide 
with another user)


See also: 
http://cvs.mmbase.org/viewcvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders


Index: Contexts.java
===================================================================
RCS file: 
/var/cvs/applications/cloudcontext/src/org/mmbase/security/implementation/cloudcontext/builders/Contexts.java,v
retrieving revision 1.48.2.2
retrieving revision 1.48.2.3
diff -u -b -r1.48.2.2 -r1.48.2.3
--- Contexts.java       8 Dec 2008 16:31:47 -0000       1.48.2.2
+++ Contexts.java       9 Dec 2008 09:33:30 -0000       1.48.2.3
@@ -35,7 +35,7 @@
  * @author Eduard Witteveen
  * @author Pierre van Rooden
  * @author Michiel Meeuwissen
- * @version $Id: Contexts.java,v 1.48.2.2 2008/12/08 16:31:47 michiel Exp $
+ * @version $Id: Contexts.java,v 1.48.2.3 2008/12/09 09:33:30 michiel Exp $
  * @see    org.mmbase.security.implementation.cloudcontext.Verify
  * @see    org.mmbase.security.Authorization
  */
@@ -915,8 +915,7 @@
      * util
      */
     protected MMObjectNode getUserNode(UserContext user) {
-        Provider users = Authenticate.getInstance().getUserProvider();
-        return users.getUser(user.getIdentifier());
+        return ((User) user).getNode();
     }
 
     protected MMObjectNode getGroupOrUserNode(Parameters a) {
@@ -997,7 +996,7 @@
             if (checkingUser == null) {
                 throw new SecurityException("Self was not supplied");
             }
-            // find the user first, the check if the current user actually has 
rights on the object
+            // find the user first, the check if the current user actually has 
rights on the objec
             Provider users = Authenticate.getInstance().getUserProvider();
             MMObjectNode userToCheck = 
users.getUserBuilder().getNode(a.getString("usertocheck"));
             if (userToCheck == null) { // the user is null?
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to