Skip to content

Commit

Permalink
Fix checkPermission call (it was acquired from portal_membership unti…
Browse files Browse the repository at this point in the history
…l CMF 2.3)
  • Loading branch information
davisagli authored and jensens committed Oct 21, 2017
1 parent 8846595 commit a1df98c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ New features:

Bug fixes:

- Zope4 compatibility:

- Do not call views in TAL.

- Fix checkPermission call (it was acquired from portal_membership until CMF 2.3).

[davisagli, pbauer]

- Added verbosity to the multiple GS profiles popping up.
Mark all as ``old`` and ``backward compatibility``.
This hopefully reduces the error rate in site setup.
Expand Down
10 changes: 4 additions & 6 deletions Products/ATContentTypes/tests/test_portal_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,8 @@ def testCopyPermission(self):
pm = self.portal.portal_membership
pm.addMember('editor', 'secret', ['Editor'], [])
self.login('editor')
member = pm.getMemberById('editor')
self.assertTrue(member.checkPermission(Permissions.copy_or_move,
self.portal))
self.assertTrue(
pm.checkPermission(Permissions.copy_or_move, self.portal))
security = getSecurityManager()
self.assertTrue(security.validate(
self.portal, self.portal, 'manage_copyObjects'))
Expand All @@ -182,9 +181,8 @@ def testRenamePermission(self):
pm = self.portal.portal_membership
pm.addMember('editor', 'secret', ['Editor'], [])
self.login('editor')
member = pm.getMemberById('editor')
self.assertTrue(member.checkPermission(ModifyPortalContent,
self.portal))
self.assertTrue(
pm.checkPermission(ModifyPortalContent, self.portal))
security = getSecurityManager()
self.assertTrue(security.validate(
self.portal, self.portal, 'manage_renameObjects'))
Expand Down

0 comments on commit a1df98c

Please sign in to comment.