geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r178760 - /geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyRealm.java
Date Fri, 27 May 2005 06:25:03 GMT
Author: jgenender
Date: Thu May 26 23:25:02 2005
New Revision: 178760

URL: http://svn.apache.org/viewcvs?rev=178760&view=rev
Log:
Added test to see if user or role is null in isUserInRole

Modified:
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyRealm.java

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyRealm.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyRealm.java?rev=178760&r1=178759&r2=178760&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyRealm.java (original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JAASJettyRealm.java Thu
May 26 23:25:02 2005
@@ -129,6 +129,10 @@
     }
 
     public boolean isUserInRole(Principal user, String role) {
+        if (user == null || role == null) {
+            return false;
+        }
+        
         AccessControlContext acc = ContextManager.getCurrentContext();
         try {
             acc.checkPermission(new WebRoleRefPermission(JettyServletHolder.getCurrentServletName(),
role));



Mime
View raw message