[CMF-checkins] SVN: CMF/trunk/ - Shuffle CHANGES entried into HISTORY

Jens Vagelpohl jens at dataflake.org
Tue Mar 13 13:39:29 EDT 2007


Log message for revision 73157:
  - Shuffle CHANGES entried into HISTORY
  
  - CMFCore.MembershipTool: Removed ancient LoginManager compatibility code
    and deprecated the no longer needed __getPUS method.
  is line, and those below, will be ignored--
  
  M    HISTORY.txt
  M    CHANGES.txt
  M    CMFCore/MembershipTool.py
  

Changed:
  U   CMF/trunk/CHANGES.txt
  U   CMF/trunk/CMFCore/MembershipTool.py
  U   CMF/trunk/HISTORY.txt

-=-
Modified: CMF/trunk/CHANGES.txt
===================================================================
--- CMF/trunk/CHANGES.txt	2007-03-13 16:09:16 UTC (rev 73156)
+++ CMF/trunk/CHANGES.txt	2007-03-13 17:39:28 UTC (rev 73157)
@@ -1,179 +1,11 @@
-CMF 2.1.0-beta (unreleased)
+CMF 2.2.0-beta (unreleased)
 
-  IMPORTANT NOTE:
-
-    If you upgrade an existing CMF instance to CMF 2.1, please see
-    INSTALL.txt for instructions on how to run a separate upgrade script.
-
-  New Features
-
-    - CMFCalendar: Zope3 style browser views are now used by default.
-      An additional setup profile allows you to hook up the oldstyle skins and
-      to make customizations TTW.
-
-    - DirectoryView: Added 'registerDirectory' ZCML directive.
-      Using the old registerDirectory method in __init__.py is now deprecated.
-      See zcml.IRegisterDirectoryDirective for details.
-
-    - DirectoryView: Added support for non-product packages.
-      This introduces new registry keys. Old registry keys stored in
-      persistent DirectoryView objects are updated on the fly.
-      (http://www.zope.org/Collectors/CMF/467)
-
-    - Document: Added two new methods for safety belt handling.
-
-    - setup handlers: Improved properties handler.
-      It now works with properties using a default_charset other than UTF-8.
-
-    - Merged patches from Martin Aspeli to enable generating events before
-      and after DCWorkflow transitions, and in the 'notify' methods of the
-      workflow tool (http://www.zope.org/Collectors/CMF/461).
-
-  Bug Fixes
-
-    - CMFUid.UniqueIdHandlerTool: Touching the internal UID value on a
-      content item will not cause reindexing all indices anymore, only the
-      specific UID index will be touched.
-      (http://www.zope.org/Collectors/CMF/469)
-
-    - CMFCore.MembershipTool: Fixed inconsistent behavior where member lookup
-      would take all user folders up to the Zope root into account whereas
-      member area creation would not.
-
-    - CMFCore.MembershipTool/CMFDefault.MembershipTool: when using an
-      object without a __nonzero__ but with a __len__ (ala
-      CMFBTreeFolder) as a member folder, the createMemberArea method
-      would believe there was no members folder if the folder was
-      empty, and so would fail (change "not membersfolder" to
-      "membersfolder is not None") .
-
-    - CMFDefault.File and CMFDefault.Image: Restored ZMI Cache tab which was
-      lost in CMF 1.6.
-
-    - CMFCore.DynamicType: Fixed behaviour regarding default view.
-      DynamicType was making it impossible to use a Zope3-style
-      default view for CMF content types.
-      (http://www.zope.org/Collectors/CMF/459)
-
   Others
 
-    - Tool lookup and registration is now done "the Zope 3 way" as utilities.
-      Please see docs/ToolsAreUtilities.txt for some developer notes.
+    - CMFCore.MembershipTool: Removed ancient LoginManager compatibility code
+      and deprecated the no longer needed __getPUS method.
+    
 
-    - CMFCore utils: Marked 'minimalpath' and 'expandpath' as deprecated.
+CMF 2.1.x and earlier
 
-    - The CMF now depends on Zope 2.10.2 or higher.
-
-
-CMF 2.1.0-alpha2 (2006/11/23)
-
-  New Features
-
-    - WorkflowTool: Added the IConfigurableWorkflowTool interface.
-      This change includes the new 'getDefaultChain' and 'listChainOverrides'
-      methods and an improved 'setChainForPortalTypes' method. The import
-      handler now supports the 'remove' attribute for removing overrides.
-      (http://www.zope.org/Collectors/CMF/457)
-
-    - CMFCore.CachingPolicyManager: Implemented the old OFS.Cache.CacheManager
-      API. Now objects other than CMF content or CMF templates can have their
-      caching headers set by the caching policy manager with the same 
-      fine-grained control.
-      (http://www.zope.org/Collectors/CMF/408)
-
-    - testing: Added test layers for setting up ZCML.
-
-    - CMFDefault formlib: Added zope.formlib support.
-      This includes some CMF specific base classes and an 'EmailLine' field.
-
-    - browser views: Added some zope.formlib based forms.
-
-    - CMFDefault utils: Added 'checkEmailAddress' function.
-
-    - Added CMFCore.FSRestMethod:  ReST equivalent of FSSTXMethod.
-
-    - CMFCore.FSSTXMethod:  Modernized, added tests, made customization
-      possible (now renders via ZPT by default, using 'main_template').
-
-    - Portal: Added 'email_charset' property.
-
-    - CMFDefault utils: Added 'makeEmail' function.
-
-    - CMFDefault.Image and CMFDefault.File: Overridden index_html methods
-      add Cache Policy Manager-awareness and thus bring these implementations
-      in line with CMFCore.FSFile and CMFCore.FSImage
-      (http://www.zope.org/Collectors/CMF/454)
-
-  Bug Fixes
-
-    - CMFCore.CachingPolicyManager: Prevent firing of caching policies
-      for templates (DTML or ZPT) that are rendered in-line (without a 
-      separate request) while rendering the requested content item's view.
-      (http://www.zope.org/Collectors/CMF/456)
-
-    - CMFDefault RegistrationTool: Fixed too restrictive email checking.
-      The new 'checkEmailAddress' function is now used.
-
-    - Fixed test breakage induced by use of Z3 pagetemplates in Zope 2.10+.
-
-    - CMFDefault skins: Fixed encoding issues in welcome and reminder emails.
-      'password_email' and 'registered_email' now encode their return value
-      correctly, using 'email_charset' and the new 'makeEmail' function.
-
-  Others
-
-    - The CMF now depends on Zope 2.10.1
-
-
-CMF 2.1.0-alpha (2006/10/09)
-
-  New Features
-
-    - CMFDefault utils: Added getBrowserCharset function.
-      Returns the charset preferred by the browser. Strings encoded with this
-      charset are decoded correctly by Five.browser.decode.processInputs.
-
-    - Content: Added IFactory utilities for all content classes.
-      They are now used by default instead of the old constructor methods.
-
-    - FactoryTypeInformation: Added support for Zope3 style factories.
-      If the 'product' property of a type info instance is empty the 'factory'
-      property is interpreted as an IFactory name.
-
-  Bug Fixes
-
-    - CMFCore.ActionInformation: don't use a fixed set of properties for
-      ActionInformation. (http://www.zope.org/Collectors/CMF/232/)
-
-    - CMFCore.CatalogTool: Use current executable's proxy roles, if any,
-      in place of user's roles when computing 'allowedRolesAndUsers' for
-      a query. (http://www.zope.org/Collectors/CMF/380)
-
-  Others
-
-    - skins: Changed encoding of translated portal_status_messages.
-      Now getBrowserCharset is used to play nice with Five forms. Customized
-      setRedirect and getMainGlobals scripts have to be updated.
-
-    - FSFile: Added registration for 'txt' extension.
-
-    - Profiles: All profiles are now registered by ZCML.
-
-    - ZClasses: Removed unmaintained support for ZClasses.
-      Marked the 'initializeBases*' methods as deprecated. 
-
-    - Content: All content classes are now registered by ZCML.
-      ContentInit is still used to register oldstyle constructors.
-
-    - Favorite: Added 'handleFavoriteAddedEvent' subscriber.
-      This replaces the 'manage_afterAdd' hook and some code in 'addFavorite'.
-
-    - CMFCatalogAware: Added 'handleObjectEvent' subscriber.
-      This replaces the deprecated 'manage_afterAdd', 'manage_afterClone' and
-      'manage_beforeDelete' hooks.
-
-    - setup handlers: Removed support for CMF 1.5 CMFSetup profiles.
-
-CMF 2.0.x and earlier
-
   For a complete list of changes see HISTORY.txt.

Modified: CMF/trunk/CMFCore/MembershipTool.py
===================================================================
--- CMF/trunk/CMFCore/MembershipTool.py	2007-03-13 16:09:16 UTC (rev 73156)
+++ CMF/trunk/CMFCore/MembershipTool.py	2007-03-13 17:39:28 UTC (rev 73157)
@@ -15,6 +15,7 @@
 $Id$
 """
 import logging
+from warnings import warn
 
 from AccessControl import ClassSecurityInfo
 from AccessControl.User import nobody
@@ -335,16 +336,12 @@
             name = user.getUserName()
             # this really does need to be the user name, and not the user id,
             # because we're dealing with authentication credentials
-            if hasattr(acl_users.aq_base, 'credentialsChanged'):
-                # Use an interface provided by LoginManager.
-                acl_users.credentialsChanged(user, name, password)
-            else:
-                req = self.REQUEST
-                p = getattr(req, '_credentials_changed_path', None)
-                if p is not None:
-                    # Use an interface provided by CookieCrumbler.
-                    change = self.restrictedTraverse(p)
-                    change(user, name, password)
+            req = self.REQUEST
+            p = getattr(req, '_credentials_changed_path', None)
+            if p is not None:
+                # Use an interface provided by CookieCrumbler.
+                change = self.restrictedTraverse(p)
+                change(user, name, password)
 
     security.declareProtected(ManageUsers, 'getMemberById')
     def getMemberById(self, id):
@@ -379,16 +376,12 @@
             return uf.getUserById(username)
 
     def __getPUS(self):
-        # Gets something we can call getUsers() and getUserNames() on.
-        acl_users = self.acl_users
-        if hasattr(acl_users, 'getUsers'):
-            return acl_users
-        else:
-            # This hack works around the absence of getUsers() in LoginManager.
-            # Gets the PersistentUserSource object that stores our users
-            for us in acl_users.UserSourcesGroup.objectValues():
-                if us.meta_type == 'Persistent User Source':
-                    return us.__of__(acl_users)
+        """ Retrieve the nearest user folder
+        """
+        warn('__getPUS is deprecated and will be removed in CMF 2.4, '
+             'please acquire "acl_users" instead.', DeprecationWarning,
+             stacklevel=2)
+        return self.acl_users
 
     security.declareProtected(ManageUsers, 'listMemberIds')
     def listMemberIds(self):
@@ -396,14 +389,14 @@
         replaced with a set of methods for querying pieces of the
         list rather than the entire list at once.
         '''
-        user_folder = self.__getPUS()
+        user_folder = self.acl_users
         return [ x.getId() for x in user_folder.getUsers() ]
 
     security.declareProtected(ManageUsers, 'listMembers')
     def listMembers(self):
         '''Gets the list of all members.
         '''
-        return map(self.wrapUser, self.__getPUS().getUsers())
+        return map(self.wrapUser, self.acl_users.getUsers())
 
     security.declareProtected(ListPortalMembers, 'searchMembers')
     def searchMembers( self, search_param, search_term ):
@@ -470,16 +463,7 @@
         '''Adds a new member to the user folder.  Security checks will have
         already been performed.  Called by portal_registration.
         '''
-        acl_users = self.acl_users
-        if hasattr(acl_users, '_doAddUser'):
-            acl_users._doAddUser(id, password, roles, domains)
-        else:
-            # The acl_users folder is a LoginManager.  Search for a UserSource
-            # with the needed support.
-            for source in acl_users.UserSourcesGroup.objectValues():
-                if hasattr(source, 'addUser'):
-                    source.__of__(self).addUser(id, password, roles, domains)
-            raise "Can't add Member", "No supported UserSources"
+        self.acl_users._doAddUser(id, password, roles, domains)
 
         if properties is not None:
             member = self.getMemberById(id)

Modified: CMF/trunk/HISTORY.txt
===================================================================
--- CMF/trunk/HISTORY.txt	2007-03-13 16:09:16 UTC (rev 73156)
+++ CMF/trunk/HISTORY.txt	2007-03-13 17:39:28 UTC (rev 73157)
@@ -1,3 +1,180 @@
+CMF 2.1.0-beta (2007/03/09)
+
+  IMPORTANT NOTE:
+
+    If you upgrade an existing CMF instance to CMF 2.1, please see
+    INSTALL.txt for instructions on how to run a separate upgrade script.
+
+  New Features
+
+    - CMFCalendar: Zope3 style browser views are now used by default.
+      An additional setup profile allows you to hook up the oldstyle skins and
+      to make customizations TTW.
+
+    - DirectoryView: Added 'registerDirectory' ZCML directive.
+      Using the old registerDirectory method in __init__.py is now deprecated.
+      See zcml.IRegisterDirectoryDirective for details.
+
+    - DirectoryView: Added support for non-product packages.
+      This introduces new registry keys. Old registry keys stored in
+      persistent DirectoryView objects are updated on the fly.
+      (http://www.zope.org/Collectors/CMF/467)
+
+    - Document: Added two new methods for safety belt handling.
+
+    - setup handlers: Improved properties handler.
+      It now works with properties using a default_charset other than UTF-8.
+
+    - Merged patches from Martin Aspeli to enable generating events before
+      and after DCWorkflow transitions, and in the 'notify' methods of the
+      workflow tool (http://www.zope.org/Collectors/CMF/461).
+
+  Bug Fixes
+
+    - CMFUid.UniqueIdHandlerTool: Touching the internal UID value on a
+      content item will not cause reindexing all indices anymore, only the
+      specific UID index will be touched.
+      (http://www.zope.org/Collectors/CMF/469)
+
+    - CMFCore.MembershipTool: Fixed inconsistent behavior where member lookup
+      would take all user folders up to the Zope root into account whereas
+      member area creation would not.
+
+    - CMFCore.MembershipTool/CMFDefault.MembershipTool: when using an
+      object without a __nonzero__ but with a __len__ (ala
+      CMFBTreeFolder) as a member folder, the createMemberArea method
+      would believe there was no members folder if the folder was
+      empty, and so would fail (change "not membersfolder" to
+      "membersfolder is not None") .
+
+    - CMFDefault.File and CMFDefault.Image: Restored ZMI Cache tab which was
+      lost in CMF 1.6.
+
+    - CMFCore.DynamicType: Fixed behaviour regarding default view.
+      DynamicType was making it impossible to use a Zope3-style
+      default view for CMF content types.
+      (http://www.zope.org/Collectors/CMF/459)
+
+  Others
+
+    - Tool lookup and registration is now done "the Zope 3 way" as utilities.
+      Please see docs/ToolsAreUtilities.txt for some developer notes.
+
+    - CMFCore utils: Marked 'minimalpath' and 'expandpath' as deprecated.
+
+    - The CMF now depends on Zope 2.10.2 or higher.
+
+
+CMF 2.1.0-alpha2 (2006/11/23)
+
+  New Features
+
+    - WorkflowTool: Added the IConfigurableWorkflowTool interface.
+      This change includes the new 'getDefaultChain' and 'listChainOverrides'
+      methods and an improved 'setChainForPortalTypes' method. The import
+      handler now supports the 'remove' attribute for removing overrides.
+      (http://www.zope.org/Collectors/CMF/457)
+
+    - CMFCore.CachingPolicyManager: Implemented the old OFS.Cache.CacheManager
+      API. Now objects other than CMF content or CMF templates can have their
+      caching headers set by the caching policy manager with the same 
+      fine-grained control.
+      (http://www.zope.org/Collectors/CMF/408)
+
+    - testing: Added test layers for setting up ZCML.
+
+    - CMFDefault formlib: Added zope.formlib support.
+      This includes some CMF specific base classes and an 'EmailLine' field.
+
+    - browser views: Added some zope.formlib based forms.
+
+    - CMFDefault utils: Added 'checkEmailAddress' function.
+
+    - Added CMFCore.FSRestMethod:  ReST equivalent of FSSTXMethod.
+
+    - CMFCore.FSSTXMethod:  Modernized, added tests, made customization
+      possible (now renders via ZPT by default, using 'main_template').
+
+    - Portal: Added 'email_charset' property.
+
+    - CMFDefault utils: Added 'makeEmail' function.
+
+    - CMFDefault.Image and CMFDefault.File: Overridden index_html methods
+      add Cache Policy Manager-awareness and thus bring these implementations
+      in line with CMFCore.FSFile and CMFCore.FSImage
+      (http://www.zope.org/Collectors/CMF/454)
+
+  Bug Fixes
+
+    - CMFCore.CachingPolicyManager: Prevent firing of caching policies
+      for templates (DTML or ZPT) that are rendered in-line (without a 
+      separate request) while rendering the requested content item's view.
+      (http://www.zope.org/Collectors/CMF/456)
+
+    - CMFDefault RegistrationTool: Fixed too restrictive email checking.
+      The new 'checkEmailAddress' function is now used.
+
+    - Fixed test breakage induced by use of Z3 pagetemplates in Zope 2.10+.
+
+    - CMFDefault skins: Fixed encoding issues in welcome and reminder emails.
+      'password_email' and 'registered_email' now encode their return value
+      correctly, using 'email_charset' and the new 'makeEmail' function.
+
+  Others
+
+    - The CMF now depends on Zope 2.10.1
+
+
+CMF 2.1.0-alpha (2006/10/09)
+
+  New Features
+
+    - CMFDefault utils: Added getBrowserCharset function.
+      Returns the charset preferred by the browser. Strings encoded with this
+      charset are decoded correctly by Five.browser.decode.processInputs.
+
+    - Content: Added IFactory utilities for all content classes.
+      They are now used by default instead of the old constructor methods.
+
+    - FactoryTypeInformation: Added support for Zope3 style factories.
+      If the 'product' property of a type info instance is empty the 'factory'
+      property is interpreted as an IFactory name.
+
+  Bug Fixes
+
+    - CMFCore.ActionInformation: don't use a fixed set of properties for
+      ActionInformation. (http://www.zope.org/Collectors/CMF/232/)
+
+    - CMFCore.CatalogTool: Use current executable's proxy roles, if any,
+      in place of user's roles when computing 'allowedRolesAndUsers' for
+      a query. (http://www.zope.org/Collectors/CMF/380)
+
+  Others
+
+    - skins: Changed encoding of translated portal_status_messages.
+      Now getBrowserCharset is used to play nice with Five forms. Customized
+      setRedirect and getMainGlobals scripts have to be updated.
+
+    - FSFile: Added registration for 'txt' extension.
+
+    - Profiles: All profiles are now registered by ZCML.
+
+    - ZClasses: Removed unmaintained support for ZClasses.
+      Marked the 'initializeBases*' methods as deprecated. 
+
+    - Content: All content classes are now registered by ZCML.
+      ContentInit is still used to register oldstyle constructors.
+
+    - Favorite: Added 'handleFavoriteAddedEvent' subscriber.
+      This replaces the 'manage_afterAdd' hook and some code in 'addFavorite'.
+
+    - CMFCatalogAware: Added 'handleObjectEvent' subscriber.
+      This replaces the deprecated 'manage_afterAdd', 'manage_afterClone' and
+      'manage_beforeDelete' hooks.
+
+    - setup handlers: Removed support for CMF 1.5 CMFSetup profiles.
+
+
 CMF 2.0.0 (2006/04/16)
 
   New Features



More information about the CMF-checkins mailing list