User with no role generates an error
------------------------------------

         Key: JBPORTAL-190
         URL: http://jira.jboss.com/jira/browse/JBPORTAL-190
     Project: JBoss Portal
        Type: Bug
  Components: Portal Core  
    Versions: 2.0 Beta    
    Reporter: Thomas Heute
 Assigned to: Thomas Heute 
     Fix For: 2.0 Beta


If a user is in no role, the following exception happens:
java.lang.NullPointerException
        at java.util.Arrays.mergeSort(Arrays.java:1152)
        at java.util.Arrays.sort(Arrays.java:1079)
        at 
org.apache.catalina.realm.GenericPrincipal.<init>(GenericPrincipal.java:77)
        at 
org.jboss.web.tomcat.security.JBossGenericPrincipal.<init>(JBossGenericPrincipal.java:46)
        at 
org.jboss.web.tomcat.security.JBossSecurityMgrRealm.getCachingPrincpal(JBossSecurityMgrRealm.jav
a:342)

We need either to make sure a user is in a default immutable role, or that a 
user can have no role (but does not crash).

For now, portlet.xml must contain a default role for the user portlet:
      <init-param>
         <description>Default role of registered users</description>
         <name>defaultRole</name>
         <value>Users</value>
      </init-param>
In this case "Users" must be an existing name of role in the database.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to