-
Bug
-
Resolution: Fixed
-
Low
-
9.1.0
-
Severity 3 - Minor
-
-
CtB - Improve Existing
-
Warranty
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
- Create user (for e.g. user1)
- Create space (for e.g. it has space key TST)
- Go to Space Tools -> Permissions grant user all permissions in this space
- 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;
- Restart confluence
- 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
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.