[Zope] Can't access a method 'in this context'

Chris Withers chrisw@nipltd.com
Tue, 20 Aug 2002 17:27:35 +0100


Tim Hicks wrote:
> 
> # 'self' is the plugin converter object
> folder = self.restrictedTraverse(path_to_folder)
> #Authenticate with the same acl_users as the original uploader
> acl_users = folder.acl_users
> user = acl_users.authenticate(qfile.user, qfile.passw, request={})
> user = user.__of__(acl_users)
> newSecurityManager(None, user)

Urm, I don't know whether that'll work. If it doesn't error, you may experience 
weird security stuff happening later on...

Urm, hang on... ;-)

> Debug log output reveals the following:
> 
> 2002-08-20 00:10:41,871 DEBUG dir(self.aq_parent) => ['_objects',
> '_pluginConverters', 'asyncSuccess', 'cleanId', 'currentConverter',
> 'handleFiles', 'id', 'makeZPT', 'nullUpload', 'title', 'uploadBox',
> 'uploadBoxAsync', 'uploadDispatch', 'uploadDispatchAsync']
> 2002-08-20 00:10:41,871 DEBUG self.aq_parent.__roles__ => ('Anonymous',
> 'Manager', 'sysUser', 'zlaveUser')
> 2002-08-20 00:10:41,901 DEBUG dir(user) => ['__', 'domains', 'name',
> 'roles']
> 2002-08-20 00:10:41,901 DEBUG user.roles => ['Manager']

And that helps me how? ;-)

cheers,

Chris