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

Bad error message when creating a wiki and the id is a reserved one

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 17.8.0-rc-1
    • 16.10.0
    • Wiki
    • None
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Right now it says:

          @Test
          void createWhenWikiIdIsForbidden() throws Exception
          {
              // The wiki does not already exist
              when(this.wikiDescriptorManager.exists("wikiid1")).thenReturn(false);
      
              // Forbidden list
              when(this.xwiki.Param("xwiki.virtual.reserved_wikis")).thenReturn("forbidden,wikiid1");
      
              Throwable exception = assertThrows(WikiManagerException.class, () -> {
                  this.wikiManager.create("wikiid1", "wikialias1", true);
              });
              assertEquals("wiki id [wikiid1] is already used and is thus not available", exception.getMessage());
          }
      

      It should say it's reserved instead.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: