Bulk add/remove members from groups #57

Closed
opened 2 months ago by r389li · 2 comments
r389li commented 2 months ago
Owner

Currently the ceo groups addmember and removemember commands only take one argument. This is painful when we need to bulk update membership of groups. Implement the following:

  1. Take an arbitrary number of arguments after the above commands, where each whitespace-separated argument is a username, except for the first which is the name of the group.
  2. Create a new command under ceo groups called removeall that takes a single argument, the name of the group, and removes all users from that group.
Currently the `ceo groups addmember` and `removemember` commands only take one argument. This is painful when we need to bulk update membership of groups. Implement the following: 1. Take an arbitrary number of arguments after the above commands, where each whitespace-separated argument is a username, except for the first which is the name of the group. 2. Create a new command under `ceo groups` called `removeall` that takes a single argument, the name of the group, and removes all users from that group.
Owner

What about...

for user in user1 user2 user3 ...; do
    yes | ceo groups addmember somegroup $user
done
What about... ```sh for user in user1 user2 user3 ...; do yes | ceo groups addmember somegroup $user done ```
Poster
Owner

Why not integrate it into CEO with a simple for loop than have to use a bash script each time? UX :) Plus I have CEO commands aliased so this wouldn't work very well for me.

Why not integrate it into CEO with a simple for loop than have to use a bash script each time? UX :) Plus I have CEO commands aliased so this wouldn't work very well for me.
merenber closed this issue 2 months ago
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.