-
Notifications
You must be signed in to change notification settings - Fork 30
JNUC2019 Lab Session H Adding to Groups
Chris Lasell edited this page Oct 4, 2019
·
7 revisions
-
There are a couple of ways to add and remove members from static groups
-
The original way is to add them individually by name or id, then save the group back to the JSS
-
change_membership
is a little different from most methods that change objects. It uses the ability of the API to add and remove members directly via non-standardPUT
tags, without locally changing the membership list and then saving the whole group,
my_grp.change_membership add_members: new_comp_ids
# => array of member data
-
There's no need to do a
my_grp.save
when usingchange_membership
- the changes are immediately applied to the JSS -
You can also provide a
remove_members:
parameter to add and remove at the same time.