XWiki Platform
  1. XWiki Platform
  2. XWIKI-8863

Hide "Add > Workspace" top menu when the user does not have view rights on the WorksapceManager.CreateNewWorkspace page

    Details

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

      Description

      The current way of handling the right of users to create workspaces is to limit their access to the main wiki`s WorkspaceManager.CreateNewWorkspace page.

      However, if a user does not have view access to the page, it means that he is not able to create workspaces and the create workspace option in the top menu should not be visible.

        Activity

        Hide
        Anca Luca added a comment -

        As the issue explains, this was needed when there was no right for workspace creation and everybody could do it, we needed to remove view right on the creation page to prevent them from doing so.
        In recent versions (5.0+), there is the workspace creation right so this issue is actually about:

        • making sure that the menu is not displayed when the user does not have the right to create a workspace
        • testing what happens when the user does not have the view right on the page but has the right, for example (we don't need to "fix" these cases if they behave strangely, but documenting this behaviour with a comment to this issue could be interesting).
        Show
        Anca Luca added a comment - As the issue explains, this was needed when there was no right for workspace creation and everybody could do it, we needed to remove view right on the creation page to prevent them from doing so. In recent versions (5.0+), there is the workspace creation right so this issue is actually about: making sure that the menu is not displayed when the user does not have the right to create a workspace testing what happens when the user does not have the view right on the page but has the right, for example (we don't need to "fix" these cases if they behave strangely, but documenting this behaviour with a comment to this issue could be interesting).
        Hide
        Guillaume Delhumeau added a comment - - edited

        Since 5.2, the "Add > Workspace" top menu is not displayed if the user has not the CREATE_WIKI right. So we don't need to also check the right for the WorksapceManager.CreateNewWorkspace.
        Actually, if the user does not has the "view" right on the page but has a CREATE_WIKI right, then there is a problem in page. I don't think it is a good idea to hide this problem to the user if she has played badly with the rights.
        That's why I close the bug as "won't fix".

        Show
        Guillaume Delhumeau added a comment - - edited Since 5.2, the "Add > Workspace" top menu is not displayed if the user has not the CREATE_WIKI right. So we don't need to also check the right for the WorksapceManager.CreateNewWorkspace. Actually, if the user does not has the "view" right on the page but has a CREATE_WIKI right, then there is a problem in page. I don't think it is a good idea to hide this problem to the user if she has played badly with the rights. That's why I close the bug as "won't fix".
        Hide
        Marius Dumitru Florea added a comment -

        Guillaume Delhumeau you close it as "Fixed".

        Show
        Marius Dumitru Florea added a comment - Guillaume Delhumeau you close it as "Fixed".

          People

          • Assignee:
            Guillaume Delhumeau
            Reporter:
            Eduard Moraru
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

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