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

Groups picker should allow to pick a group relative to current wiki

    Details

    • Development Priority:
      High
    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Currently the user and groups picker always store the full reference of the picked entity, even if they're in "local selection" mode (xwiki:XWiki.Group or subwiki:XWiki.Group but never XWiki.Group).

      While this could be perfectly normal for the users selector, since a user is unique and needs to be properly identified, this can be less normal in the case of groups because groups represent roles and we could be interested in saying "users with X role from the current wiki, whichever that might be".

      This can be especially useful in the case of an application / extension, which could be installed on multiple wikis and could want to use relative roles, and for 2 special groups: XWikiAdminGroup and XWikiAllGroups, which exist by default on the wikis and which have special meanings.

      Let's take the simple example of giving rights (giving rights to a group uses group picker in object mode), for a page, for which the user has chosen from the UI the local "XWiki.XWikiAllGroup". He does this action on the wiki 'a' and then he copies the page with rights on the wiki 'b'. He might expect one of the following 3 things:
      1/ rigths on the copied page should be given to group b:XWiki.XWikiAllGroup (selected group is relative)
      2/ rights on the copied page should be given to group a:XWiki.XWikiAllGroup (selected group is absolute)
      3/ wiki a was actually, the main wiki, and he would want that the rights on the copied page are given to the global xwiki:XWiki.XWikiAllGroup.

      Case 1 was what was happening until now with the dumb groups and user picker we used to have, unless explicitly manually set otherwise. Case 2 is what is happening today always with the new groups / users picker.

      Now, from my experience, cases 1 and 3 make a lot more sense than case 2. Actually I cannot remember a situation when case 2 was desired.

      I would prefer to revert this behaviour to always storing groups relative to current page until we find a better solution to let the user know exactly what will happen.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                lucaa Anca Luca
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: