[CMF-checkins] CVS: CMF/CMFCollector - Collector.py:1.13
Ken Manheimer
klm@zope.com
Fri, 26 Oct 2001 20:25:40 -0400
Update of /cvs-repository/CMF/CMFCollector
In directory cvs.zope.org:/tmp/cvs-serv10966
Modified Files:
Collector.py
Log Message:
.edit(): Make sure the managers list is populated by some reasonable
default.
=== CMF/CMFCollector/Collector.py 1.12 => 1.13 ===
self.email = email
changes.append("Email")
- if managers is not None:
+ if managers is not None or not self.managers:
# XXX Vette managers - they must exist, etc.
x = filter(None, managers)
- if ((userid in self.managers)
- and (userid not in x)):
+ if not self.managers:
+ changes.append("(Managers set must be non-empty)")
+ owners = self.users_with_local_role('Owner')
+ if owners:
+ x.extend(owners)
+ else:
+ x.append(userid)
+ elif ((userid in self.managers)
+ and (userid not in x)):
changes.append("(Managers may not deenlist themselves)")
x.append(userid)
if util.sorted(self.managers) != util.sorted(x):