Re: [Zope-dev] method attribute __roles__ in Zope 2.8

2005-02-21 Thread Jim Fulton
Andreas Jung wrote: I can across the following problem while trying to fix the broken FTP service for Zope 2.8: ObjectManager.manage_FTPstat() tries to access self.manage_FTPlist.__roles__ whose value is ('Manager',') in Zope 2.7. In 2.8 this attribute is not available. Can someone explain

Re: [Zope-dev] method attribute __roles__ in Zope 2.8

2005-02-21 Thread Jim Fulton
You didn't use the getattr that Dieter suggested. But see my other follow on note. Jim Andreas Jung wrote: --On Sonntag, 20. Februar 2005 19:42 Uhr +0100 Dieter Maurer [EMAIL PROTECTED] wrote: You can use the getattr above to resolve the attribute. That really did not help: - print

__roles__ hack (was Re: [Zope-dev] method attribute __roles__ in Zope 2.8)

2005-02-21 Thread Jim Fulton
Why do we have __roles__ in the first place? After all, when we declare protections for our classes, we do so with permissions. The answer lies in a terrible mistake I made years ago. Long before Principia, there was Bobo. Bobo originally had a security model based on roles. Objects had a

Re: [Zope-dev] method attribute __roles__ in Zope 2.8

2005-02-21 Thread Jim Fulton
Andreas Jung wrote: I can across the following problem while trying to fix the broken FTP service for Zope 2.8: ObjectManager.manage_FTPstat() tries to access self.manage_FTPlist.__roles__ Why is it trying to do this? Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!

Re: [Zope-dev] method attribute __roles__ in Zope 2.8

2005-02-21 Thread Andreas Jung
--On Montag, 21. Februar 2005 9:17 Uhr -0500 Jim Fulton [EMAIL PROTECTED] wrote: Andreas Jung wrote: I can across the following problem while trying to fix the broken FTP service for Zope 2.8: ObjectManager.manage_FTPstat() tries to access self.manage_FTPlist.__roles__ Why is it trying to do

Re: [Zope-dev] method attribute __roles__ in Zope 2.8

2005-02-20 Thread Dieter Maurer
Andreas Jung wrote at 2005-2-20 12:33 +0100: I can across the following problem while trying to fix the broken FTP service for Zope 2.8: ObjectManager.manage_FTPstat() tries to access self.manage_FTPlist.__roles__ whose value is ('Manager',') in Zope 2.7. In 2.8 this attribute is not available.

Re: [Zope-dev] method attribute __roles__ in Zope 2.8

2005-02-20 Thread Andreas Jung
--On Sonntag, 20. Februar 2005 19:42 Uhr +0100 Dieter Maurer [EMAIL PROTECTED] wrote: You can use the getattr above to resolve the attribute. That really did not help: - print getattr(self.manage_FTPlist, '__roles__') (Pdb) AttributeError: 'function' object has no attribute '__roles__'