diff options
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/ldap/LDAPLookup.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lookup/ldap/LDAPLookup.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/c2kernel/lookup/ldap/LDAPLookup.java b/src/main/java/com/c2kernel/lookup/ldap/LDAPLookup.java index 96ab609..0d3cbd4 100644 --- a/src/main/java/com/c2kernel/lookup/ldap/LDAPLookup.java +++ b/src/main/java/com/c2kernel/lookup/ldap/LDAPLookup.java @@ -432,7 +432,7 @@ public class LDAPLookup implements LookupManager{ }
else if (LDAPLookupUtils.existsAttributeValue(entry,"objectclass","cristalrole"))
{ //cristalrole
- thisPath = new RolePath(LDAPDN.explodeDN(dn,true)[0],
+ thisPath = new RolePath(getPathComponents(dn.substring(0, dn.lastIndexOf(mDomainTypeRoot))),
LDAPLookupUtils.getFirstAttributeValue(entry, "jobList").equals("TRUE"));
}
else if (LDAPLookupUtils.existsAttributeValue(entry,"objectclass","aliasObject") ||
@@ -496,7 +496,6 @@ public class LDAPLookup implements LookupManager{ @Override
public Iterator<Path> getChildren(Path path) {
- if (path instanceof RolePath) return ((RolePath)path).getChildren();
String filter = "objectclass=*";
LDAPSearchConstraints searchCons = new LDAPSearchConstraints();
searchCons.setBatchSize(10);
@@ -561,16 +560,14 @@ public class LDAPLookup implements LookupManager{ }
- //NOTE: A role must have at LEAST 1 userDN, cannot be empty...
//Creates a cristalRole
//CristalRole is-a specialized CristalContext which contains multi-valued uniqueMember attribute pointing to cristalagents
@Override
- public RolePath createRole(String roleName, boolean jobList)
+ public RolePath createRole(RolePath rolePath)
throws ObjectAlreadyExistsException, ObjectCannotBeUpdated
{
// create the role
- RolePath rolePath = new RolePath(roleName, jobList);
String roleDN = getFullDN(rolePath);
LDAPEntry roleNode;
try
|
