[ZWeb] Re: attributes of users (fwd)

Martijn Pieters mj@digicool.com
Fri, 30 Mar 2001 21:09:23 +0200


On Fri, Mar 30, 2001 at 06:13:56PM +0200, Martijn Pieters wrote:
> > to test some things it would be nice if i could get a so-called LDIF (the
> > file format understood by the LDAP tools) containing current user data from
> > zope.org. the format is very simple:
> > 
> > every user has a record that looks like this, replace <user> with the user's
> > login name and the other <> things are self-explanatory:
> > 
> > dn: cn=<user>,ou=people,dc=zope,dc=org
> > objectClass: top
> > objectClass: person
> > objectClass: zopeOrgPerson
> > cn: <user>
> > sn: <user last name>
> > gn: <user first name>
> > o: <user company>
> > mail: <user email>
> > public: <set to 0 or 1>
> 
> Note that we don't *have* a first and last name filed, only a full name.
> The 'name' field that Ethan refers to, is just the user ID, the login
> name.
> 
> For now, I'll split full_name on the first space, and set gn to the
> first string of the resulting list, and sn to whatever is left (if
> anything).
> 
> > it shouldn't be too hard to do a script that picks this data out of the
> > existing user folder and writes it into a file.
> > 
> > there must be one empty line between each record and there must not be any
> > empty spaces after the last letter on a line.
> 
> I'll build this. What do we do to switch over? Stop all access to Zope.org
> or just the joining process?
> 
> > > name
> > > email
> > > last_visit
> > > full_name
> > > prev_visit
> > > company
> > > public

This turned out to be public_email. I still export it as the field
'public' in the LDIF file though.

> > >
> > > don't quite know why we store name as a property as well. Anyway, we need
> > > password too :)
> 
> See above, it's the login name.

It's done, anyone with the Manager Role can go to
http://www.zope.org/Utilities/allMembers.ldif to download the LDIF file.
It's content-type is set to text/directory, this being the designated
mime-type for LDAP data. Watch it though, it's a 2.7M download until we
clean out the stale users. :)

Jens, let me know if there are any special escaping needs, and if it is ok
for some fields to be empty ('o: ', for example).

-- 
Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------