Skip to content

Commit

Permalink
T258401: Fix test and actually allow deletion of module's acl_users
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Dick committed Jun 7, 2024
1 parent 7e4b776 commit 31ebf9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions perfact/zodbsync/tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -2047,8 +2047,9 @@ def test_keep_acl(self):
assert 'acl_users' in self.app.objectIds()

# now create dummy module with its own acl_users folder
self.app.manage_addFolder(id='some_module')
self.app.some_module.manage_addUserFolder()
with self.runner.sync.tm:
self.app.manage_addFolder(id='some_module')
self.app.some_module.manage_addUserFolder()

self.run('record', '/')

Expand Down
2 changes: 1 addition & 1 deletion perfact/zodbsync/zodbsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ def _playback_path(self, pathinfo):
del_ids = [
a for a in srv_contents
if a not in contents and
(path != '/acl_users' and a != 'acl_users')
not (obj == self.app and a == 'acl_users')
]
if del_ids:
self.logger.warning('Deleting objects ' + repr(del_ids))
Expand Down

0 comments on commit 31ebf9e

Please sign in to comment.