Skip to content

Commit

Permalink
Update commands to process archived users in groups
Browse files Browse the repository at this point in the history
  • Loading branch information
taers232c committed May 28, 2021
1 parent 125ed8c commit ce9de93
Show file tree
Hide file tree
Showing 8 changed files with 331 additions and 137 deletions.
42 changes: 29 additions & 13 deletions src/GamCommands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,10 @@ Specify a collection of Users by directly specifying them or by specifiying item
(group_users|group_users_ns|group_users_susp <GroupList>
[members] [managers] [owners]
[primarydomain] [domains <DomainNameList>] [recursive|includederivedmembership] end)|
(group_users_select <GroupList>
[members] [managers] [owners]
[notsuspended|suspended] [notarchived|archived]
[primarydomain] [domains <DomainNameList>] [recursive|includederivedmembership] end)|
(ou|ou_ns|ou_susp <OrgUnitItem>)|
(ou_and_children|ou_and_children_ns|ou_and_children_susp <OrgUnitItem>)|
(ous|ous_ns|ous_susp <OrgUnitList>)|
Expand Down Expand Up @@ -2538,28 +2542,33 @@ gam update group|groups <GroupEntity> [email <EmailAddress>]
[admincreated <Boolean>]
[verifynotinvitable]
gam update group|groups <GroupEntity> create|add [<GroupRole>]
[usersonly|groupsonly] [notsuspended|suspended]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[[delivery] <DeliverySetting>]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> delete|remove [<GroupRole>]
[usersonly|groupsonly] [notsuspended|suspended]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> sync [<GroupRole>]
[usersonly|groupsonly] [addonly|removeonly] [notsuspended|suspended]
[usersonly|groupsonly] [addonly|removeonly]
[notsuspended|suspended] [notarchived|archived]
[removedomainnostatusmembers]
[[delivery] <DeliverySetting>]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> update [<GroupRole>]
[usersonly|groupsonly] [notsuspended|suspended]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[[delivery] <DeliverySetting>]
[createifnotfound]
[preview] [actioncsv]
<UserTypeEntity>
gam update group|groups <GroupEntity> clear [member] [manager] [owner]
[usersonly|groupsonly] [notsuspended|suspended]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[emailclearpattern|emailretainpattern <RegularExpression>]
[removedomainnostatusmembers]
[preview] [actioncsv]
Expand Down Expand Up @@ -2646,7 +2655,7 @@ gam info group|groups <GroupEntity>
[basic] <GroupFieldName>* [fields <GroupFieldNameList>] [nodeprecated]
[ciallfields|(cifields <CIGroupFieldNameList>)]
[members] [managers] [owners]
[notsuspended|suspended]
[notsuspended|suspended] [notarchived|archived]
[types <GroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[formatjson]
Expand All @@ -2664,7 +2673,7 @@ gam print groups [todrive <ToDriveAttribute>*]
[roles <GroupRoleList>]
[members|memberscount] [managers|managerscount] [owners|ownerscount] [totalcount] [countsonly]
[includederivedmembership]
[notsuspended|suspended]
[notsuspended|suspended] [notarchived|archived]
[types <GroupTypeList>]
[memberemaildisplaypattern|memberemailskippattern <RegularExpression>]
[convertcrnl] [delimiter <Character>] [sortheaders]
Expand All @@ -2689,7 +2698,8 @@ gam info member|group-members <UserTypeEntity> <GroupEntity>
gam print group-members [todrive <ToDriveAttribute>*]
[([domain <DomainName>] ([member <UserItem>]|[query <QueryGroup>]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)] [notsuspended|suspended]
(select <GroupEntity>)]
[notsuspended|suspended] [notarchived|archived]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
Expand All @@ -2704,7 +2714,8 @@ gam print group-members [todrive <ToDriveAttribute>*]
gam show group-members
[([domain <DomainName>] ([member <UserItem>]|[query <QueryGroup>]))|
(group|group_ns|group_susp <GroupItem>)|
(select <GroupEntity>)] [notsuspended|suspended]
(select <GroupEntity>)]
[notsuspended|suspended] [notarchived|archived]
[showownedby <UserItem>]
[emailmatchpattern [not] <RegularExpression>] [namematchpattern [not] <RegularExpression>]
[descriptionmatchpattern [not] <RegularExpression>]
Expand Down Expand Up @@ -2734,18 +2745,23 @@ gam create cigroup <EmailAddress> [copyfrom <GroupItem>] <GroupAttribute>*
gam update cigroup <GroupEntity> [copyfrom <GroupItem>] <GroupAttribute>
[security|makesecuritygroup] [dynamic <QueryDynamicGroup>]
gam update cigroups <GroupEntity> create|add [<GroupRole>]
[usersonly|groupsonly] [notsuspended|suspended]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> delete|remove [<GroupRole>]
[usersonly|groupsonly] [notsuspended|suspended] [preview] [actioncsv]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> sync [<GroupRole>]
[usersonly|groupsonly] [addonly|removeonly] [notsuspended|suspended]
[usersonly|groupsonly] [addonly|removeonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> update [<GroupRole>]
[usersonly|groupsonly] [notsuspended|suspended]
[usersonly|groupsonly]
[notsuspended|suspended] [notarchived|archived]
[expire|expires <Time>] [preview] [actioncsv]
<UserTypeEntity>
gam update cigroups <GroupEntity> clear [member] [manager] [owner]
Expand Down
33 changes: 33 additions & 0 deletions src/GamUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
6.03.26

Updated the following commands to allow selection of archived users from a source group.
```
gam update group add|delete|update|sync
gam update cigroups add|delete|update|sync
```
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Groups-Membership
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Cloud-Identity-Groups-Membership

Updated the following command to allow selection of archived users to be cleared.
```
gam update group clear
```
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Groups-Membership

Updated the following commands to allow selection of archived users for display.
```
gam info group
gam print groups
gam print group-members
```
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Groups

Added new option to `<UserTypeEntity>` that allows selection of group members based on their archived status.
```
group_users_select <GroupList>
[members] [managers] [owners]
[notsuspended|suspended] [notarchived|archived]
[primarydomain] [domains <DomainNameList>] [recursive|includederivedmembership] end
```
See: https://github.com/taers232c/GAMADV-XTD3/wiki/Collections-of-Users#selected-users-from-groups

6.03.25

Updated `gam create project` to handle Google change that causes the following error:
Expand Down
5 changes: 2 additions & 3 deletions src/gam-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ adminuser=""
regularuser=""
gam_x86_64_glibc_vers="2.31 2.27 2.23 2.19 2.15"
gam_arm64_glibc_vers="2.31 2.27 2.23"
gam_macos_vers="11.1 11.0 10.15 10.14 10.13 10.12 10.11 10.10"

while getopts "hd:a:o:b:lp:u:r:v:" OPTION
do
Expand Down Expand Up @@ -337,7 +336,7 @@ while $project_created; do
done

service_account_authorized=false
while $project_created; do
while $admin_authorized; do
read -p "Are you ready to authorize GAM to manage Google Workspace user data and settings? (yes or no) " yn
case $yn in
[Yy]*)
Expand All @@ -356,7 +355,7 @@ while $project_created; do
fi
;;
[Nn]*)
echo -e "\nYou can authorize a service account later by running:\n\ngam check serviceaccount\n"
echo -e "\nYou can authorize a service account later by running:\n\ngam user $adminuser check serviceaccount\n"
break
;;
*)
Expand Down
Loading

0 comments on commit ce9de93

Please sign in to comment.