Bug 52835 - Possible to change primary group to one that a user is not a member of
Possible to change primary group to one that a user is not a member of
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-23 11:15 CET by Lukas Zumvorde
Modified: 2022-10-14 16:14 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?: Yes
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Zumvorde univentionstaff 2021-02-23 11:15:33 CET
The issue can not be replicated in a pure vanilla UCS, but once we add more complex administration concepts it can come up in any customer environment.


In the Newmail project we have Groups with limited administration rights. Meaning they can add users to some groups but not to others. They can also set the primary group. If we use the UMC - User Module and select as a primary group one that the user is not currently a member of, the user is added to this group automatically. If this fails because the limited admin has no right to add the user to this group, then we get an error message, but the primary group is still set.

So to restate the issue:
- We have a limited admin that is allowed to add users to Group A but not group B.
- The limited admin has the right to change the primary group of a user.
- The admin sets the primary group of a user to B
- He gets an error message because UCS is trying to also add the user to group B.
- The primary group of the user is still set to B, despite the error.

The customer expects the operation to fail completely, resulting in no change to the user object. The customer also expects the primary group to always be that of one the user is a member of.

I would propose to add a feature to all UMC modules. Whenever a change is made, first check if all changes can be performed, if they can then continue as normal. If they can't then produce an error message and do not perform any operation.