Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-9591

Better handling of Group page upgrades using DW

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • 5.2
    • None
    • Unknown

    Description

      When we modify a group page (like XWiki.XWikiAdminGroup or XWiki.XWikiAllGroup) the user can get a merge conflict when he upgrades.

      The reason in the case of the upgrade to 5.2 is:

      • The current version is different from the previous version since admins have added users to groups
      • The new version is also different since in 5.2 we added 1 empty XObject (we added an empty object by default to support removing the last user without breaking the group)

      It would be nicer to not generate a merge conflict which is dangerous. For example if the user is logged as admin locally and makes the mistake of selecting the new version he'll loose his admin rights and wouldn't be able to finish the upgrade.

      There are several options. I can imagine a few:

      • We could have a generic feature of allowing special merge handlings for specific pages such as these group pages. For example in this case if there are already user objects in a group page, then perform the merge by using the existing objects and discarding the 2 new ones.
      • We could check if the user is part of the admin group and if he's going to remove himself, warn him about it before doing it so give him the choice to not use the new version. Or more generally warn him about the fact that he's going to remove all users currently part of this group and allow him to not do that.
      • Another option is to prevent conflicts from happening We could imagine not having any XWikiGroup XObject in the XAR in those group pages and have the Admin user created on the first start of XWiki. This would remove the merge conflict issue.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: