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

Some wiki components are not registered when creating a wiki with a non-admin user

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0-milestone-2
    • Fix Version/s: 11.3, 10.11.8
    • Component/s: Wiki
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Follow this steps to reproduce:

      • download the attached maven module
      • unpack and build it locally so that the XAR is published in the local maven repository
      • take a clean XWiki instance (I used 11.3RC1) and:
        • edit xwiki.properties and enable the local maven repository for the Extension Manager
        • use the advanced search from Extension Manager to locate the extension and install it
          • extension id: org.xwiki.contrib:application-testuix
          • extension version: 1.0-SNAPSHOT
        • At this point you should see the "This is a test." message displayed after header.
      • Create a new simple user
      • Give wiki creation right to this new user
      • login with this user and create a new wiki from the wiki index

      The wiki creation log contains some warning and an error:

      Starting job of type [wikicreationjob] with identifier [wikicreation/createandinstall/math]
      Unable to register the component associated to [Object math:Test.TestUIX^XWiki.UIExtensionClass[0]]: WikiComponentException: Registering UI extensions at wiki level requires wiki administration rights
      Starting job of type [install] with identifier [wikicreation/install/math]
      Starting job of type [installplan]
      Resolving extension [XWiki Standard Flavor - Sub Wiki 11.3-rc-1] on namespace [Math Club]
      ...
      Applying [INSTALL] for extension [Templates Application 1.0.2] on namespace [Math Club] from previous extension(s) []
      [programming] access has been denied for user [xwiki:XWiki.mflorea] on [Public]: security checkpoint
      Access denied when checking [programming] access to [Main Wiki] for user [xwiki:XWiki.mflorea]
      class org.xwiki.security.authorization.AccessDeniedException: Access denied when checking [programming] access to [Main Wiki] for user [xwiki:XWiki.mflorea]
          at org.xwiki.security.authorization.DefaultAuthorizationManager.checkAccess(DefaultAuthorizationManager.java:94)
          at org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.checkRegistrationAuthorization(DocumentTranslationBundleFactory.java:439)
          at org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.registerTranslationBundle(DocumentTranslationBundleFactory.java:418)
          at org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.translationDocumentUpdated(DocumentTranslationBundleFactory.java:346)
          at org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory.access$000(DocumentTranslationBundleFactory.java:86)
          at org.xwiki.localization.wiki.internal.DocumentTranslationBundleFactory$1.onEvent(DocumentTranslationBundleFactory.java:156)
          at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:309)
          at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:274)
          at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1904)
          at org.xwiki.extension.xar.internal.handler.packager.DocumentMergeImporter.saveDocumentSetContextUser(DocumentMergeImporter.java:207)
          at org.xwiki.extension.xar.internal.handler.packager.DocumentMergeImporter.saveDocument(DocumentMergeImporter.java:153)
          at org.xwiki.extension.xar.internal.handler.packager.DocumentMergeImporter.importDocument(DocumentMergeImporter.java:116)
          at org.xwiki.extension.xar.internal.handler.packager.Packager.importDocumentToWiki(Packager.java:230)
          at org.xwiki.extension.xar.internal.handler.packager.Packager.importXARToWiki(Packager.java:188)
          at org.xwiki.extension.xar.internal.handler.packager.Packager.importXARToWiki(Packager.java:157)
          at org.xwiki.extension.xar.internal.handler.packager.Packager.importXAR(Packager.java:148)
          at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.installInternal(XarExtensionHandler.java:201)
          at org.xwiki.extension.xar.internal.handler.XarExtensionHandler.install(XarExtensionHandler.java:166)
          at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.install(DefaultExtensionHandlerManager.java:85)
          at org.xwiki.extension.job.internal.AbstractExtensionJob.installExtension(AbstractExtensionJob.java:306)
          at org.xwiki.extension.job.internal.AbstractExtensionJob.applyAction(AbstractExtensionJob.java:209)
          at org.xwiki.extension.job.internal.AbstractExtensionJob.applyActions(AbstractExtensionJob.java:157)
          at org.xwiki.extension.job.internal.InstallJob.runInternal(InstallJob.java:154)
          at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
          at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
          at org.xwiki.platform.wiki.creationjob.internal.ExtensionInstaller.installExtension(ExtensionInstaller.java:73)
          at org.xwiki.platform.wiki.creationjob.internal.steps.ProvisionWikiStep.execute(ProvisionWikiStep.java:78)
          at org.xwiki.platform.wiki.creationjob.internal.WikiCreationJob.runInternal(WikiCreationJob.java:96)
          at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
          at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      Successfully applied [INSTALL] for extension [Templates Application 1.0.2] on namespace [Math Club] from previous extension(s) []
      ...
      Successfully applied [INSTALL] for extension [XWiki Standard Flavor - Sub Wiki 11.3-rc-1] on namespace [Math Club] from previous extension(s) []
      Finished job of type [install] with identifier [wikicreation/install/math]
      Finished job of type [wikicreationjob] with identifier [wikicreation/createandinstall/math]
      

      See the full log attached. The wiki is created OK but as the warning suggests, the UI extension is not registered. I don't have an explanation for the error.

        Attachments

        1. application-testuix.zip
          4 kB
        2. createWikiError.png
          createWikiError.png
          167 kB
        3. createWikiLog.txt
          43 kB
        4. createWikiOwner.png
          createWikiOwner.png
          44 kB
        5. SubwikiErrors.jpg
          SubwikiErrors.jpg
          153 kB
        6. SubwikiErrors10.11.7.jpg
          SubwikiErrors10.11.7.jpg
          204 kB
        7. SubwikiErrors8.4.jpg
          SubwikiErrors8.4.jpg
          208 kB

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              mflorea Marius Dumitru Florea
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

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