Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *******************************************************************************
- /Users/ems174/Desktop/Products.PluggableAuthService-esteele.diff
- *******************************************************************************
- Index: /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/ZODBGroupManager.py
- ===================================================================
- --- /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/ZODBGroupManager.py (revision 108077)
- +++ /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/ZODBGroupManager.py (working copy)
- @@ -186,16 +186,17 @@
- }
- security.declarePrivate( 'updateGroup' )
- - def updateGroup( self, group_id, title, description ):
- + def updateGroup( self, group_id, title=None, description=None ):
- """ Update properties for 'group_id'
- o Raise KeyError if group_id doesn't already exist.
- """
- - self._groups[ group_id ].update({ 'title' : title
- - , 'description' : description
- - })
- - self._groups[ group_id ] = self._groups[ group_id ]
- + if title is not None:
- + self._groups[group_id]['title'] = title
- + if description is not None:
- + self._groups[group_id]['description'] = description
- + self._groups[group_id] = self._groups[group_id]
- security.declarePrivate( 'removeGroup' )
- def removeGroup( self, group_id ):
- Index: /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py
- ===================================================================
- --- /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py (revision 108077)
- +++ /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/plugins/tests/test_ZODBGroupManager.py (working copy)
- @@ -95,6 +95,19 @@
- group_info = zgm.getGroupInfo( 'group' )
- self.assertEqual( group_info['title'], 'group_title_changed' )
- + def test_updateGroup_independent(self):
- + zgm = self._makeOne()
- +
- + zgm.addGroup( 'group', 'group_title', 'group_desc' )
- +
- + zgm.updateGroup( 'group', title='group_title_changed_again')
- + group_info = zgm.getGroupInfo( 'group' )
- + self.assertEqual( group_info['description'], 'group_desc' )
- + zgm.updateGroup( 'group', description='group_description_changed_again')
- + group_info = zgm.getGroupInfo( 'group' )
- + self.assertEqual( group_info['title'], 'group_title_changed_again' )
- +
- +
- def test_addPrincipalToGroup( self ):
- zgm = self._makeOne()
- Index: /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/version.txt
- ===================================================================
- --- /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/version.txt (revision 108077)
- +++ /Users/ems174/plone4dev/src/Products.PluggableAuthService/Products/PluggableAuthService/version.txt (working copy)
- @@ -1 +1 @@
- -1.7.0b1
- +1.7.0b2
- Index: /Users/ems174/plone4dev/src/Products.PluggableAuthService/CHANGES.txt
- ===================================================================
- --- /Users/ems174/plone4dev/src/Products.PluggableAuthService/CHANGES.txt (revision 108077)
- +++ /Users/ems174/plone4dev/src/Products.PluggableAuthService/CHANGES.txt (working copy)
- @@ -1,6 +1,12 @@
- Change Log
- ==========
- +
- +1.7.0b2 (Unreleased)
- +--------------------
- +
- +- Modify ZODBGroupManager to update group title and description independently.
- +
- 1.7.0b1 (2009-11-16)
- --------------------
Add Comment
Please, Sign In to add comment