From: Alan Runyan <runyaga@ru...> - 2003-01-15 14:47:48
I am cross posting this since it is relevant to exUserFolder.
On my objects that are below the exUserFolder I am
have a modified get_valid_userids which is the same
thing w/o the aq_base. It seems to work just fine. I
The problem is I'm using exUserFolder w/ my own
Authentication Source and really dont have time to
The problem is, of course now I have to track
changes to get_valid_userids() ... *sigh* oh well.
I have run out of time/$$$ for this project and
this one thing took me several hours. I could
imagine less experienced people giving up.
NOTE: before you give up.. ask the mailing list.
for exUserFolder users they can read below on
my dilema because I would imagine someone
having teh same problem. (They want to
share Database connections across many exUserFolder
thanks Stefan for your reply.
----- Original Message -----
From: "Stefan H. Holek" <stefan@...>
To: "Alan Runyan" <runyaga@...>
Sent: Wednesday, January 15, 2003 3:36 AM
Subject: Re: [Zope] Security Guru Question
> I have been developing a user folder that requires the REQUEST to be
> acquireable at all times. I hit the very same wall wrt local roles
> Issue seems to be that 'user_names' is called on an unwrapped 'acl_user=
> Just like you I figured that it is probably not a good idea to remove t=
> call to 'aq_base'. My solution was to rewrap 'user_names' right before
> calling it.
> --- Role.py Thu Oct 17 19:14:50 2002
> +++ Role.py Thu Oct 17 19:37:35 2002
> @@ -312,6 +312,7 @@
> if mlu < 0: raise OverflowError
> un =3D getattr(aclu, 'user_names', _notfound)
> if un is not _notfound:
> + un =3D aclu.__of__(item).user_names # rewrap
> unl =3D un()
> # maxlistusers of 0 is list all
> if len(unl) > mlu and mlu !=3D 0:
> --On Mittwoch, 15. J=E4nner 2003 00:25 -0600 Alan Runyan
> <runyaga@...> wrote:
> > Its inside of AccessControl/Role.py in get_valid_userids()
> > I have a object herirachy like:
> > Zope Root -> MyApp -> Company -> Business Units
> > in My App I have a PsycoPG connection object call my_users
> > and in all Companies I have a exUserFolder.
> > now when I goto a Company or Business Unit and try to
> > assign/edit/list Local roles it bombs. Because exUserFolder
> > cant find the 'my_users' connection object. Why? Well
> > I know why..
> > because when the xxxLocalRoles screens are called they
> > call get_valid_userids which at the top says:
> > aclu =3D getattr(aq_base(item), 'acl_users', _notfound)
> > and immediately aclu has all acquisition wrappers peeled off
> > of it and now I can not go any further up the heirarchy than
> > Company.
> > I am very tempted in taking the aq_base(item) part off..and
> > I believe all will work... But I really need someone who
> > understands the implications of this to say whats the best
> > way forward. I was thinking about overriding this method
> > in my Company/Business Unit classes with a version that
> > doesnt have aq_base().
> Those who write software only for pay should go hurt some other field.
> /Erik Naggum/