⚠️ This issue respects the following points: ⚠️
Bug description
A sub-admin of the two groups receives the following error when attempting to remove a user (who is member of the same two groups) from a group they administer by doing PATCH req same as web browser does:
Error:
groups: Insufficient permissions to change groups
Request:
curl -u naruto:naruto \
-H " OCS-APIRequest: true" \
-H " Content-Type: application/json" \
-X PATCH \
https://nextcloud.local/ocs/v2.php/cloud/users/hinata \
-d ' {"groups":["naruto"]}'
Response:
{
"ocs" : {
"meta" : {
"status" : " failure" ,
"statuscode" : 422 ,
"message" : " "
},
"data" : {
"errors" : {
"groups" : " Insufficient permissions to change groups"
}
}
}
}
Note
DELETE request works
Request:
curl -u naruto:naruto \
-H " OCS-APIRequest: true" \
-X DELETE \
https://nextcloud.local/ocs/v2.php/cloud/users/sakura/groups\? groupid\= naruto
Response:
<?xml version =" 1.0" ?>
<ocs >
<meta >
<status >ok</status >
<statuscode >200</statuscode >
<message >OK</message >
</meta >
<data />
</ocs >
Steps to reproduce
Log in as admin.
Create two groups (e.g. naruto and boruto).
Create a user (e.g. naruto) and add the user (naruto) as both member and admin of the two groups.
Log in as the created user (naruto).
Create another user (e.g. hinata) and add them as a member of both groups.
Attempt to remove hinata from either group.
Expected behavior
The group admin should be able to remove the user from the group.
Nextcloud Server version
34
Operating system
Debian/Ubuntu
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Bug description
A sub-admin of the two groups receives the following error when attempting to remove a user (who is member of the same two groups) from a group they administer by doing
PATCHreq same asweb browserdoes:Error:
Request:
Response:
{ "ocs": { "meta": { "status": "failure", "statuscode": 422, "message": "" }, "data": { "errors": { "groups": "Insufficient permissions to change groups" } } } }Note
DELETE request works
Request:
Response:
Steps to reproduce
admin.narutoandboruto).naruto) and add the user (naruto) as both member and admin of the two groups.naruto).hinata) and add them as a member of both groups.hinatafrom either group.Expected behavior
The group admin should be able to remove the user from the group.
Nextcloud Server version
34
Operating system
Debian/Ubuntu
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response