[Zope-CMF] SkinnedFolder Creator problem
Sidnei da Silva
sidnei@x3ng.com
Tue, 8 Oct 2002 17:00:39 -0300
On Tue, Oct 08, 2002 at 09:32:19PM +0200, Florent Guillaume wrote:
| > So, should I fix DublinCore Creator to use a real Creator or fix the
| > SkinnedFolder creator to not bomb on unittests?
|
| We should discuss how to best fix DublinCore. Would everybody be ok with
| a single string property for Creator?
+1
| OTOH the test error in Plone must be investigated first. If the tests
| require a valid user, why not give them one? (a dummy one of course)
| Lots of tests do that.
Wait wait wait... I havent said that the tests require a valid
user. In my opinion, it shouldnt need a valid user, as much as
DublinCore Creator doesnt needs one (AFAIK).
IMO, the Creator method of Skinned folder is making an assumption that
it shouldnt do, as it seems that this only works when SkinnedFolders
are created TTW.
Compare the methods:
<from DublinCore.DefaultDublinCoreImpl>
def Creator( self ):
# XXX: fixme using 'portal_membership' -- should iterate over
# *all* owners
"Dublin Core element - resource creator"
owner = self.getOwner()
if hasattr( owner, 'getUserName' ):
return owner.getUserName()
return 'No owner'
<from SkinnedFolder.SkinnedFolder>
def Creator( self ):
"""
Return the ID of our owner.
"""
return self.getOwner( info=1 )[1]
[]'s
--
Sidnei da Silva (dreamcatcher) <sidnei@x3ng.com.br>
X3ng Web Technology <http://www.x3ng.com.br>
GNU/Linux user 257852
Debian GNU/Linux 3.0 (Sid) 2.4.18 ppc
"sic transit discus mundi"
(From the System Administrator's Guide, by Lars Wirzenius)