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

Right issue with REST API on subwiki in path-based multiwiki

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 4.1.2, 4.2-milestone-1
    • 4.0, 4.1
    • REST
    • None
    • rest, rights, path-based
    • Unknown
    • n/a
    • n/a

    Description

      To reproduce :

      With a non-admin user, open a page in a subwiki of a path-based multiwiki, and in the javascript console run the following :

      new Ajax.Request(new XWiki.Document("WebHome", "Sandbox").getURL(), {method: "GET"});
      

      And then compare with the equivalent REST URL :

      new Ajax.Request(new XWiki.Document("WebHome", "Sandbox").getRestURL(), {method: "GET"});
      

      The second one answers 401 unauthorized.

      The unauthorized status is returned in XWikiResource.java, around line 205 :
      throw new WebApplicationException(Status.UNAUTHORIZED);, after no document is returned by the XWiki API.

      Attachments

        Issue Links

          Activity

            People

              jerome Jerome Velociter
              jerome Jerome Velociter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: