[jboss-cvs] JBossAS SVN: r65630 - branches/JBPAPP_4_2/testsuite/src/main/org/jboss/test/security/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 26 15:42:43 EDT 2007
Author: anil.saldhana at jboss.com
Date: 2007-09-26 15:42:43 -0400 (Wed, 26 Sep 2007)
New Revision: 65630
Modified:
branches/JBPAPP_4_2/testsuite/src/main/org/jboss/test/security/test/CustomSecurityManager.java
Log:
add an unauthenticated identity of guest for null principal checks
Modified: branches/JBPAPP_4_2/testsuite/src/main/org/jboss/test/security/test/CustomSecurityManager.java
===================================================================
--- branches/JBPAPP_4_2/testsuite/src/main/org/jboss/test/security/test/CustomSecurityManager.java 2007-09-26 19:16:35 UTC (rev 65629)
+++ branches/JBPAPP_4_2/testsuite/src/main/org/jboss/test/security/test/CustomSecurityManager.java 2007-09-26 19:42:43 UTC (rev 65630)
@@ -208,6 +208,8 @@
*/
public boolean doesUserHaveRole(Principal principal, Set roles)
{
+ if(principal == null)
+ principal = new SimplePrincipal("guest");
log.debug("[doesUserHaveRole:Principal="+principal+":rolesCheck="+roles+"]");
Set containedSet = (Set)principalToRoleMap.get(principal);
/**
More information about the jboss-cvs-commits
mailing list