[Zope-CMF] Re: [CMF-checkins] CVS: CMF/CMFCore - CatalogTool.py:1.30.4.7

Florent Guillaume fg@nuxeo.com
Mon, 28 Apr 2003 17:00:21 +0200


Shane wrote:
> > I'm probably missing something, but where are the tests to accompany 
> > these checkins?
> 
> Not only that, but I don't feel good about that change.  It mixes the 
> concept of "executable owner" and the "owner role".  The former 
> shouldn't really be called ownership.  At ZC we've been planning to 
> rename the concept.  It's more like a "code signature" or something.

I agree with Shane. The executable owner has nothing to do with what's
going on here. A local role of Owner is set by Zope when someone creates
an object, and the allowedRolesAndUsers code deals with it correctly
(through the rolesForPermissionOn call).

BTW, the removal of 'Owner' at the end is there because 'Owner' is
designed to be a local role only and it's been felt (by Tres I guess)
that it's better to not provide an opportunity for users having a global
role Owner for whatever reason to see content they don't really own.

So Sidnei, please revert.

Florent


> > Sidnei da Silva wrote:
> > 
> >> Update of /cvs-repository/CMF/CMFCore
> >> In directory cvs.zope.org:/tmp/cvs-serv2038/CMFCore
> >>
> >> Modified Files:
> >>       Tag: CMF-1_3-branch
> >>     CatalogTool.py Log Message:
> >> Owner was not being added to allowedRolesAndUsers
> >>
> >> === CMF/CMFCore/CatalogTool.py 1.30.4.6 => 1.30.4.7 ===
> >> --- CMF/CMFCore/CatalogTool.py:1.30.4.6    Thu Aug  1 15:07:55 2002
> >> +++ CMF/CMFCore/CatalogTool.py    Thu Apr 24 17:25:23 2003
> >> @@ -61,6 +61,10 @@
> >>                  if allowed.has_key(role):
> >>                      allowed['user:' + user] = 1
> >>          if allowed.has_key('Owner'):
> >> +            owner = ob.getOwner()
> >> +            if hasattr( owner, 'getId' ):
> >> +                if owner.getId() is not None:
> >> +                    allowed['user:' + owner.getId()] = 1
> >>              del allowed['Owner']
> >>          return list(allowed.keys())
> > 

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com