Setting user_group_memberships in API endpoint /api/user always fails in Metabase Pro #46671
Description
Describe the bug
Since our Update to Metabase Pro, Metabase seems unable to update Group Membership via user_group_memberships in api/user.
"You cannot add or remove users to/from the 'All Users' group." always appears.
To Reproduce
PUT api/user/13371344
Data: {"user_group_memberships": [{"id": 33}, {"id": 1}, {"id": 34}, {"id": 36}, {"id": 3}, {"id": 5}, {"id": 41}, {"id": 11}, {"id": 16}, {"id": 29}]}
Response:
You cannot add or remove users to/from the 'All Users' group.
If I try to remove gid=1 (All Users), the error still remains...
PUT api/user/13371344
Data: {"user_group_memberships": [{"id": 33}, {"id": 34}, {"id": 36}, {"id": 3}, {"id": 5}, {"id": 41}, {"id": 11}, {"id": 16}, {"id": 29}]}
Response:
You cannot add or remove users to/from the 'All Users' group.
Expected behavior
The request should be executed the same way as before in the non-pro version
Logs
2024-08-09 12:58:17,358 [DEBUG] cron-metabase-ldap-sync: MB request details: put /api/user/13371344
Request data:
{'user_group_memberships': [{'id': 33}, {'id': 1}, {'id': 34}, {'id': 36}, {'id': 3}, {'id': 5}, {'id': 41}, {'id': 11}, {'id': 16}, {'id': 29}]}
Response data: (code=400)
You cannot add or remove users to/from the 'All Users' group.
2024-08-09 13:12:40,496 [DEBUG] cron-metabase-ldap-sync: MB request details: put /api/user/13371344
Request data:
{'user_group_memberships': [{'id': 33}, {'id': 34}, {'id': 36}, {'id': 3}, {'id': 5}, {'id': 41}, {'id': 11}, {'id': 16}, {'id': 29}]}
Response data: (code=400)
You cannot add or remove users to/from the 'All Users' group.
Information about your Metabase installation
v1.50.11
Built on 2024-07-09
Severity
blocking
Additional context
No response