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

WikiUserManager#isMember is not reliable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.10.8
    • Wiki
    • None
    • Unknown

    Description

      WikiUserManager API relies on a blurry "userId" concept in its API which is not explained, but it relies in fact on the serialization of the users used in the groups: it means that the API doesn't work when providing a fully serialized reference containing the wiki reference if the user is a local user of the wiki. It means in turn that the API doesn't allow to distinguish two users with same reference on two different wikis.

      Reproduction steps:

      • On a fresh jetty/hsqldb create a page containing:
      {{velocity}}
      $services.wiki.user.isMember('XWiki.Admin', 'xwiki')
      $services.wiki.user.isMember('xwiki:XWiki.Admin', 'xwiki')
      {{/velocity}}
      

      Expected result:

      • the page should display two "true"

      Obtained result:

      • the page displays "true", "false"

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: