Update of /var/cvs/contributions/didactor2/src/core/java/nl/didactor/security
In directory james.mmbase.org:/tmp/cvs-serv32050

Modified Files:
        Authentication.java 
Log Message:
making sure you can always hack in if you have access to file system


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/security


Index: Authentication.java
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/security/Authentication.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- Authentication.java 8 Aug 2008 12:43:22 -0000       1.37
+++ Authentication.java 13 Aug 2008 10:25:45 -0000      1.38
@@ -50,6 +50,7 @@
      */
     protected void load() {
         String[] securityClasses = {
+            PropertiesSecurityComponent.class.getName(),
                 "nl.didactor.security.aselect.ASelectSecurityComponent", // if 
available, use aselect first
                 PlainSecurityComponent.class.getName()      // always fall 
back on plain
         };
@@ -95,9 +96,9 @@
     protected org.mmbase.security.UserContext 
request(org.mmbase.security.UserContext uc, HttpServletRequest req) {
         Node n = 
getUserNode(ContextProvider.getDefaultCloudContext().getCloud("mmbase"), 
uc.getIdentifier());
         req.setAttribute("user", n == null ? "0" : n.getNumber());
-        log.debug("Found user " + n.getNumber() + " " + uc);
+        log.debug("Found user " + (n == null ? "NULL" :  n.getNumber()) + " " 
+ uc);
         Object education = req.getAttribute("education");
-        if (education != null) {
+        if (education != null && n != null) {
             Function fun = n.getFunction("class");
             Parameters params = fun.createParameters();
             params.set("education", education);
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to