Uploaded image for project: 'Atlassian Cloud'
  1. Atlassian Cloud
  2. CLOUD-5115

SVN Permission Manager sets wrong permissions for paths that contain spaces

XMLWordPrintable

      Giving commit permission to a group for a path that contains spaces will seem to work fine, but members of the group will not be able to check out/update from and/or commit to that path.

      How to reproduce

      Prerequisites

      • A hosted JIRA Studio environment with a project that has a hosted Subversion repository. The project key used in these instructions will be TES
      • At least one JIRA Studio group apart from the standard groups (users, developers, administrators) in the hosted JIRA Studio environment. The group name used in these instructions will be consultants.
      • Some accounts (username/password) with the hosted JIRA Studio environment:
        • One account that is a member of the JIRA Studio administrators group, in this text this account is referenced to as admin.
        • One account that is a member of the JIRA Studio developers group, in this text this account is referenced to as dev.
        • One account that is a member of the JIRA Studio consultants group, but is not a member of either the administrators group or the developers group. In this text this account is referenced to as cons.

      1. Steps to reproduce expected (correct) behavior

      1. Using your favorite subversion client, as dev check out the current TES repository contents.
      2. Create a new directory base in your working copy.
      3. In the newly created directory base, create a new directory WithoutSpaces.
      4. In the newly created directory WithoutSpaces, create a text file example.txt. Edit the file and add some arbitrary text. Save the file.
      5. Using your favorite subversion client, as dev: add base, WithoutSpaces and example.txt to subversion, and commit them to the subversion repository.
      6. In JIRA Studio, log in as admin.
      7. Open the administration page, by clicking on your username in the upper right corner and selecting Administration.
      8. Click the Source tab, to show the SVN Permission Manager page.
      9. Check that the consultants group has no permissions on the repository.
      10. In the text box below the project list, enter the repository path for the directory WithoutSpaces: /TES/base/WithoutSpaces and click the button Add next to the text box.
      11. On the page that opens, Manage Permissions for Path: /TES/base/WithoutSpaces, leave the inherited permissions as they are, and add a new permission:
        1. In the selection list labeled Permission: below the heading Add Permission, select the consultants group.
        2. In the selection list next to the Permission: list, select Commit if it isn't already selected.
        3. Click the button Add to the right of the selection lists referenced above.
      12. Wait 5 minutes.
      13. Using your favorite subversion client, as cons check out the current repository contents for TES/base/WithoutSpaces.
      14. Create a new text file in the newly checked out working copy, next to the file example.txt, called other.txt.
      15. Edit the file other.txt and add some arbitrary text. Save the file.
      16. Using your favorite subversion client, as cons add other.txt to subversion and commit the file.
      17. Commit should be successful.

      2. Steps to reproduce erroneous behavior (as described in the summary). Steps for correct behavior should have been followed.

      1. Using your favorite subversion client, as dev check out the current TES repository contents.
      2. In the directory base created earlier, create a new directory With Spaces.
      3. In the newly created directory With Spaces, create a text file example2.txt. Edit the file and add some arbitrary text. Save the file.
      4. Using your favorite subversion client, as dev: add With Spaces and example2.txt to subversion, and commit them to the subversion repository.
      5. In JIRA Studio, log in as admin.
      6. Open the administration page, by clicking on your username in the upper right corner and selecting Administration.
      7. Click the Source tab, to show the SVN Permission Manager page.
      8. Check that the consultants group has no permissions on the repository except for the permissions added when creating the case for expected correct behavior.
      9. In the text box below the project list, enter the repository path for the directory With Spaces: /TES/base/With Spaces and click the button Add next to the text box.
      10. On the page that opens, Manage Permissions for Path: /TES/base/With Spaces, leave the inherited permissions as they are, and add a new permission:
        1. In the selection list labeled Permission: below the heading Add Permission, select the consultants group.
        2. In the selection list next to the Permission: list, select Commit if it isn't already selected.
        3. Click the button Add to the right of the selection lists referenced above.
      11. Wait 5 minutes.
      12. Using your favorite subversion client, as cons check out the current repository contents for TES/base/With Spaces. This will fail, and depending on your svn client you will experience one of two things:
        1. Check out fails, probably with an authorization error, or
        2. Your svn client asks for the password for the cons account. If you provide the password, the client asks for a username. If you provide the cons username you will be prompted for a the password. This will keep repeating, or ultimately exit without a successful check out caused by an authorization failure.

      Other info

      Same bug, different setting

      It is possible to assign permissions in a way that allows users to check out and update files, but still making commits fail, probably from the same bug:

      • Follow the steps above, but also assign read-only permissions to the consultants group for the base directory.
      • In the second scenario, steps to reproduce erroneous behavior, checkout will be successful instead of failing. Follow the steps below to show the bug in this setup:
      1. Create a new text file in the newly checked out working copy, in the directory With Spaces, called other2.txt.
      2. Edit the file other2.txt and add some arbitrary text. Save the file.
      3. Using your favorite subversion client, as cons add other2.txt to subversion and commit the file.
      4. You might experience one of two things depending on your svn client:
        1. Commit fails, probably with an authorization error, or
        2. Your svn client asks for the password for the cons account. If you provide the password, the client asks for a username. If you provide the cons username you will be prompted for a the password. This will keep repeating, or ultimately exit without a successful commit, because of an authorization failure.

      Related error/bug

      If you assign privileges to a group for a specific path, all inherited privileges for that path (and subdirs) are ignored: as soon as the consultants group is assigned privileges for a specific path as per instructions above, the dev user can no longer access [files in] that directory (WithoutSpaces in the example, or base for the "Same bug, different setting" example). The dev user should be able to access files in this directory, based on inherited Commit permission for the developers group, but you need to assign explicit privileges to the developers group to allow access.

              Unassigned Unassigned
              37e19501d436 Pop Qvarnström
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: