[ZPatterns] LoginManager Bug/Patch
John Eikenberry
[email protected]
Fri, 24 Aug 2001 17:51:19 -0700
This is in relation to LoginManager--0-8-8b1. Forgive me if its fixed in
CVS. I don't have time this moment to check.
In the LoginManager class the method manage_afterAdd() is overridden and its
superclass' version is not called. This leads to unexpected behaviour if
you're familiar with how Specialists work in general. The fix is easy, just
replace the current call to Folder.manage_afterAdd() with a call to the
superclass' manage_afterAdd() method (which calls the Folder's).
The diff also fixes a similar issue with manage_beforeDelete()
Here's a patch:
--- LoginManager.py.orig Fri Aug 24 17:45:26 2001
+++ LoginManager.py Fri Aug 24 17:46:41 2001
@@ -279,13 +279,13 @@
### SimpleItem Protocol ###
def manage_beforeDelete(self,item,container):
- Folder.manage_beforeDelete(self,item,container)
+ Specialist.manage_beforeDelete(self,item,container)
if item is self:
try: del container.__allow_groups__
except: pass
def manage_afterAdd(self,item,container):
- Folder.manage_afterAdd(self,item,container)
+ Specialist.manage_afterAdd(self,item,container)
if item is self:
if hasattr(self, 'aq_base'): self=self.aq_base
container.__allow_groups__=self
--
John Eikenberry [[email protected]]
______________________________________________________________
"A society that will trade a little liberty for a little order
will deserve neither and lose both."
--B. Franklin