Skip to content

Commit

Permalink
Merge pull request #101 from zopefoundation/dataflake/issue_95
Browse files Browse the repository at this point in the history
Fix method signature of ``PluggableAuthService._setObject``
  • Loading branch information
dataflake committed Jul 2, 2021
2 parents 957872c + b2d60c3 commit d1454f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Change Log
2.6.4 (unreleased)
------------------

- Fix method signature of ``PluggableAuthService._setObject``
(`#95
<https://github.com/zopefoundation/Products.PluggableAuthService/issues/95>`_)


2.6.3 (2021-06-08)
------------------
Expand Down
3 changes: 2 additions & 1 deletion src/Products/PluggableAuthService/PluggableAuthService.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ def __creatable_by_emergency_user__(self):
return 1

@security.private
def _setObject(self, id, object, roles=None, user=None, set_owner=0):
def _setObject(self, id, object, roles=None, user=None, set_owner=0,
suppress_events=False):
#
# Override ObjectManager's version to change the default for
# 'set_owner' (we don't want to enforce ownership on contained
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2149,6 +2149,14 @@ def test__setObject_no_ownership_fixup(self):

zcuf._setObject('sub', sub)

def test__setObject_arguments(self):
# Make sure the overridden definition matches the
# superclass definition
from OFS.Folder import Folder
zcuf = self._makeOne()
sub = Folder('sub')
zcuf._setObject('sub', sub, set_owner=False, suppress_events=True)

def test__delOb_unregisters_plugin(self):

from ..interfaces.plugins import IAuthenticationPlugin
Expand Down

0 comments on commit d1454f4

Please sign in to comment.