tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6431] New: - JNDIRealm.getRoles() should return more than a single role attribute
Date Wed, 13 Feb 2002 18:21:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6431>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6431

JNDIRealm.getRoles() should return more than a single role attribute

           Summary: JNDIRealm.getRoles() should return more than a single
                    role attribute
           Product: Tomcat 4
           Version: 4.0.2 Final
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mteegarden@yahoo.com


I am using the jndi realm with a Novell directory. In setting up the role query 
I am using:
  roleBase=""
  roleName="groupMembership"
  roleSearch="(&amp;(objectClass=person)(mail={1}@akc.org))"
  roleSubtree="true"
So I'm querying the user and getting all of group (role) attributes assigned to 
it.

In getRoles(DirContext, String, String) it does not loop through the list of 
attributes for the single entity. It only returns the first attribute.

I propose it be changed to the following code.

//Add enumeration & while to loop through all roles.
    NamingEnumeration rolesList = attr.getAll();
    while (rolesList.hasMore())
    {
        // String role = (String) attr.get();
        String role = (String) rolesList.next();
        if (debug >= 3)
            log("  Found role '" + role + "'");
        list.add(role);
    }

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message