You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Mike Adamson <mi...@gmail.com> on 2011/06/16 12:31:55 UTC

Problem modifying the precriptiveAci attribute on a sub-entry

Hi,

I am having some difficulty on figuring out how to modify the
prescriptiveAci attribute on an administrative sub-entry. I can delete the
sub-entry and add it again but that seems a very inefficient way of doing
it. I don't think there is a bug anywhere I just can't figure out a way to
do it. I have tried the following:

Entry subEntry = session.lookup(subEntryDn);

String aci =
((ClonedServerEntry)subEntry).getOriginalEntry().get("prescriptiveAci").getString();

... modify the aci

ModifyRequest modifyRequest = new
ModifyRequestImpl().setName(subEntryDn).replace("prescriptiveAci", aci);

session.modify(modifyRequest);

If I do this, I get an LdapSchemaViolationException.

If I try and add another prescriptiveAci attribute to the sub-entry with:

ModifyRequest modifyRequest = new
ModifyRequestImpl().setName(subEntryDn).add("prescriptiveAci", aci);

session.modify(modifyRequest);

I get an LdapAttributeInUseException.

Any help would be gratefully received.

Thanks,

Mike Adamson