Anyone out there using ActiveLDAP have an idea how I can accomplish
creating an object one level below a known base where we have a variable
item in the middle?

That first sentence doesn’t even make sense to me. Here’s what I want
to do: I have a user class that I use for managing users. Each user
gets a ou called addressbook (which in turn will contain sub-entries,
but we’re not worried about that) like so:

I want to create the ou=addr,uid=removed_email_address@domain.invalid,PREFIX entry each time
I create a user, but I can’t figure out how to get ActiveLDAP to let me
do that. I had tried doing something like creating another model like
this:

And modifying the base.rb code for ActiveLDAP with a goofy hack to allow
setting this sort of :dnattr value, but it picks up all the methods and
attributes of a user object, so I can’t quite do that… Here’s the ex
from base.rb:

uid: removed_email_address@domain.invalid
I create a user, but I can’t figure out how to get ActiveLDAP to let me
setting this sort of :dnattr value, but it picks up all the methods and
because it doesn’t match the DN."
val = ‘’
end

And before I start breaking this any furthor, I was wondering if someone
has already done this sort of thing.

Leah,

I don’t know OxObjects - open-Xchange but I do subscribe to their mail
list as well as OGO and monitor a bit.

When I do personal address books, I don’t use a uid for the dn, I
actually use cn instead but perhaps OxObjects stores them as you are
trying.

Your notes at the top suggest a bit of confusion about the structure
itself which would probably help if you had clarity about how they were
to be stored…is it possible that you can get a response from your LDAP
server from a personal Address Book entry that was created by
open-Xchange? Something like this (not open-Xchange)

search result

search: 2
result: 0 Success

numResponses: 2

numEntries: 1

I think that would help you figure out what the structure of entries are
supposed to be exactly. It’s important to note that each ‘objectclass’
has specific 'requirements of attributes such as above…objectclass
person requires ‘cn’ and objectclass inetOrgPerson requires ‘sn’
attributes - that is if memory serves me correctly but it would seem
strange that an ‘address book entry’ would use uid at all as that is
generally reserved for a system user.

As for fiddling…I haven’t started with LDAP / rails yet but that is in
my next scheduled phase so it won’t be long.

I should also mention that as soon as my LDAP objects have sub entries,
the delete functions don’t work either as it seems that they do not
recursively delete.

I think if you have enough logging turned on for you LDAP, you would see
why. As I understand it, most LDAP systems don’t allow you to delete
containers with objects in them. Client applications would probably want
to obtain a list of all objects inside, delete them and then delete the
container.

I should also mention that as soon as my LDAP objects have sub entries,
the delete functions don’t work either as it seems that they do not
recursively delete.

I think if you have enough logging turned on for you LDAP, you would see
why. As I understand it, most LDAP systems don’t allow you to delete
containers with objects in them. Client applications would probably want
to obtain a list of all objects inside, delete them and then delete the
container.

Yes, that is correct. So I need to understand how to correctly set the
PREFIX to uid=removed_email_address@domain.invalid,ou=Users,ou=OxObjects,dc=example,dc=com
in the Addr model for ActiveLDAP. Since the uid=removed_email_address@domain.invalid part
is dynamic, I think I need to somehow tell the Addr class what that is,
and I am not clear on how to do that…

Yes, that is correct. So I need to understand how to correctly set the
PREFIX to uid=removed_email_address@domain.invalid,ou=Users,ou=OxObjects,dc=example,dc=com
in the Addr model for ActiveLDAP. Since the uid=removed_email_address@domain.invalid part
is dynamic, I think I need to somehow tell the Addr class what that is,
and I am not clear on how to do that…