-
Notifications
You must be signed in to change notification settings - Fork 227
fix: return 403 if user can't disable the space due to permissions #11845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
755f2aa to
eaf9474
Compare
eaf9474 to
df94646
Compare
|
@nirajacharya2 could you check https://drone.owncloud.com/owncloud/ocis/49440/21/6 , the scenario below? If I revert the test and use 404 instead of 403, then Brian will complain (https://drone.owncloud.com/owncloud/ocis/49437/21/6): In theory, we should expect a 403 because the user shouldn't have enough permissions to disable a personal space (correct me if I'm wrong). To clarify, I'm fine if we decide that the expected status code is 404 because the space admin shouldn't seen personal spaces, but if both users have the same role, the expected value should be the same for both. |
If i understand correctly this will the new expected behavior.
if that's the case it makes sens. i have also updated the test. |
|
I'm confused with the test. |
db1c337 to
48576a2
Compare
carol was normal user in this scenario. i have removed carol. |
|



Description
Trying to disable a space without enough permissions was throwing a 404 error despite the space was visible. A 403 error is more suitable
Related Issue
#11781
Motivation and Context
Better error reporting
How Has This Been Tested?
Manually tested. Disabling the space was done using curl because it's tricky to do it from the web.
Screenshots (if appropriate):
Types of changes
Checklist: