[Zope-Checkins] CVS: Zope/lib/python/AccessControl - User.py:1.176.14.3
Chris McDonough
chrism@zope.com
Sat, 26 Jul 2003 18:00:36 -0400
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv30293/lib/python/AccessControl
Modified Files:
Tag: Zope-2_7-branch
User.py
Log Message:
Merge for QuickStart from HEAD.
=== Zope/lib/python/AccessControl/User.py 1.176.14.2 => 1.176.14.3 ===
--- Zope/lib/python/AccessControl/User.py:1.176.14.2 Mon Jul 21 12:35:07 2003
+++ Zope/lib/python/AccessControl/User.py Sat Jul 26 18:00:00 2003
@@ -1026,6 +1026,14 @@
"""Return the named user object or None"""
return self.data.get(name, None)
+ def hasUsers(self):
+ """ This is not a formal API method: it is used only to provide
+ a way for the quickstart page to determine if the default user
+ folder contains any users to provide instructions on how to
+ add a user for newbies. Using getUserNames or getUsers would have
+ posed a denial of service risk."""
+ return not not len(self.data)
+
def _doAddUser(self, name, password, roles, domains, **kw):
"""Create a new user"""
if password is not None and self.encrypt_passwords: