[Zope-Checkins] CVS: Zope/lib/python/AccessControl - Role.py:1.50.22.3 User.py:1.157.2.2
Matthew T. Kromer
matt@zope.com
Mon, 1 Oct 2001 15:51:08 -0400
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv12041
Modified Files:
Tag: matt-userfolder-apiext
Role.py User.py
Log Message:
Change default for maxlistusers to constant DEFAULTMAXLISTUSERS in Role.py
=== Zope/lib/python/AccessControl/Role.py 1.50.22.2 => 1.50.22.3 ===
ListType=type([])
+DEFAULTMAXLISTUSERS=250
+
def _isBeingUsedAsAMethod(self):
return aq_get(self, '_isBeingUsedAsAMethod_', 0)
@@ -379,7 +381,7 @@
aclu = getattr(aq_base(item), 'acl_users', _notfound)
if aclu is not _notfound:
mlu = getattr(aclu, 'maxlistusers', _notfound)
- if type(mlu) != type(1): mlu = 0
+ if type(mlu) != type(1): mlu = DEFAULTMAXLISTUSERS
if mlu < 0: raise OverflowError
un = getattr(aclu, 'user_names', _notfound)
if un is not _notfound:
=== Zope/lib/python/AccessControl/User.py 1.157.2.1 => 1.157.2.2 ===
from base64 import decodestring
from App.ImageFile import ImageFile
-from Role import RoleManager
+from Role import RoleManager, DEFAULTMAXLISTUSERS
from PermissionRole import _what_not_even_god_should_do, rolesForPermissionOn
import AuthEncoding
from AccessControl import getSecurityManager, Unauthorized
@@ -479,7 +479,7 @@
isPrincipiaFolderish=1
isAUserFolder=1
- maxlistusers = 0
+ maxlistusers = DEFAULTMAXLISTUSERS
encrypt_passwords = 0
@@ -796,7 +796,8 @@
management_view='Properties')
def manage_setUserFolderProperties(self, encrypt_passwords=0,
- update_passwords=0, maxlistusers=0,
+ update_passwords=0,
+ maxlistusers=DEFAULTMAXLISTUSERS,
REQUEST=None):
"""
Sets the properties of the user folder.
@@ -805,7 +806,7 @@
try:
self.maxlistusers = int(maxlistusers)
except ValueError:
- self.maxlistusers = 0
+ self.maxlistusers = DEFAULTMAXLISTUSERS
if encrypt_passwords and update_passwords:
changed = 0
for u in self.getUsers():