throws JetspeedSecurityException
{
Vector perms = new Vector();
BasicAttributes attr= new BasicAttributes();
LDAPRole role;
LDAPPermission permission;
Vector userurls;
try
{
if (cachingEnable)
{
Iterator iterator = JetspeedSecurityCache.getPermissions(roleName);
if (iterator != null)
{
return iterator;
}
}
userurls = JetspeedLDAP.search(JetspeedLDAP.buildURL("ou=roles"),
"(&(uid=" + roleName + ")(objectclass=jetspeedrole))", ATTRS, true);
if (userurls.size() > 0)
{
role = new LDAPRole((LDAPURL) ((Vector)userurls.elementAt(0)).firstElement());
for (Enumeration enum1= role.getRolePermissions().elements();enum1.hasMoreElements();)
{
permission = new LDAPPermission((String)enum1.nextElement(), false);
perms.add(permission);
}
}
}
catch(Exception e)