Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
18.10.0
-
None
-
Unknown
-
Description
Adding several users to a wiki at once (WikiUserManager#addMembers, e.g. through $services.wiki.user.addMembers or when creating a wiki with members) saves a new version of the XWiki.XWikiAllGroup page of the wiki even when all the users are already members, and adds a user twice when the list contains it twice. From the UI, this happens when creating a wiki whose only selected member is its owner, who is already a member.
STEPS TO REPRODUCE:
- Create a subwiki "sub" and a user U.
- Run $services.wiki.user.addMembers(['XWiki.U'], 'sub') twice (with admin right on the wiki).
- Run $services.wiki.user.addMembers(['XWiki.V', 'XWiki.V'], 'sub').
- Look at the history and the objects of sub:XWiki.XWikiAllGroup.
EXPECTED RESULTS:
One new version for U, one for V, and one member object each.
ACTUAL RESULTS:
Each call creates a new version, and V has two member objects.
Found while working on XWIKI-22643.
Attachments
Issue Links
- relates to
-
XWIKI-22643 Documents can be saved at the same time, leading to lost writes
-
- Open
-