OCM. delete-accepted-user endpoint always returns 200
Web UI 10.3.0
Ocis: 6.5.0
Steps:
Given using server "LOCAL"
And "Alice" has generated invitation
And using server "REMOTE"
And "Brian" has accepted invitation
And "Brian" deletes connection to user "Alice"
Actual: 200. Should be 204?
And "Brian" tries to delete connection to user "Alice" - or use random userId
Expected: bad request. user not found Actual: 200
If it is not deleteting the connection (https://github.com/owncloud/ocis/issues/10216) may be better to return 405 or 501?
If it is not deleteting the connection (#10216) may be better to return 405 or 501?
Wouldn't it be a 404 (Not Found) when trying to delete a non-existing connection?
While deleting the non-existing user, in the request body:
- If I change the
idp to some random one or two digit number (like "idp":"localhost:33") then the server hangs up. - If I change the
idp to some random three digit number (like: "idp":"localhost:333" then the status code is always 200. - If I change the idp to some random 4 digit number then the status code alternates between returning 200 and 400.
https://github.com/user-attachments/assets/645bbcff-5225-4050-8ba8-44711a532cb0
https://github.com/user-attachments/assets/47db0bdb-8376-4e1e-ae0b-5a36f10a3bcf
While deleting the non-existing user, in the request body:
- If I change the
idpto some random one or two digit number (like"idp":"localhost:33"), - If I change the
idpto some random three digit number (like:"idp":"localhost:333", - If I change the
idpto some random 4 digit number:
The status code is always 200 for all above actions.
200 is returned when local user tries to delete the federated connection that has been already deleted by same user:
Given using server "LOCAL"
And "Alice" has generated invitation
And using server "REMOTE"
And "Brian" has accepted invitation
And "Alice" deletes connection to user "Brian"
And again,
"Alice" tries to delete connection to user "Brian"
curl -X DELETE "https://localhost:9200/sciencemesh/delete-accepted-user" \
-u "admin:admin" \
-H "Content-Type: application/json" \
-d '{"user_id":"<alice user_id>","idp":"localhost:10200"}' \
-kv
https://github.com/user-attachments/assets/4e39958e-6811-4047-8d3c-1f08affca9bb