We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9f6311f + d30fd07 commit 3533122Copy full SHA for 3533122
1 file changed
container-images/group-sync/group-sync.py
@@ -21,7 +21,12 @@ def add_users_to_group(group):
21
group_name = group.model.metadata.name
22
LOG.info('adding to group %s: %s', group_name, users_to_add)
23
LOG.info('removing from group %s: %s', group_name, users_to_remove)
24
+ # Update the group's users list
25
group.patch({'users': list(users_in_rolebinding)})
26
+ # Remove users from the group
27
+ for user in users_to_remove:
28
+ group.model.users.remove(user)
29
+ group.patch({'users': list(group.model.users)})
30
31
32
if __name__ == '__main__':
0 commit comments