Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-98372

When space has non-standard permissions in the db get space permission REST api fails with 500

      Issue Summary

      When space has permission in spacepermission table which doesn't match officially supported permissions, space permissions REST API GET /rest/api/space/{spacekey}/permissions  requests returns 500 Internal Server error code.

      Steps to Reproduce

      1. Create user (for e.g. user1)
      2. Create space (for e.g. it has space key TST)
      3. Go to Space Tools -> Permissions grant user all permissions in this space
      4. Modify one of the permissions in the db, so it will not match officially supported permission type. For e.g. to change EXPORTSPACE to EXPORTPAGE (which is not supported): 
        // find permission id
        select sp.permid, sp.permtype, sp.spaceid, s.spacekey, sp.permusername, u.username
        from spacepermissions sp
        join spaces s on s.spaceid = sp.spaceid
        join user_mapping u on u.user_key = sp.permusername
        where spacekey = 'TST' and u.lower_username = 'user1' and sp.permtype = 'EXPORTSPACE';
        
        // replace permission type with EXPORTPAGE (where your_permission_id is permid from previous query)
        update spacepermissions
        set permtype = 'EXPORTPAGE'
        where permid = your_permission_id;
      1. Restart confluence
      2. Call /rest/api/space/{spacekey}/permissions where spacekey matches the key of the created space

      Expected Results

      200 response is received and all officially supported permissions are returned. Permission EXPORTPAGE is not returned in response

      Actual Results

      Request returns with 500 Internal Server error response

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            [CONFSERVER-98372] When space has non-standard permissions in the db get space permission REST api fails with 500

            Quan Pham added a comment -

            A fix for this issue is available in Confluence Server and Data Center 9.2.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

            Quan Pham added a comment - A fix for this issue is available in Confluence Server and Data Center 9.2.0. Upgrade now or check out the Release Notes to see what other issues are resolved.

              03cb0c04aa4f Irina Tiapchenko
              03cb0c04aa4f Irina Tiapchenko
              Affected customers:
              0 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: