mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-28 09:51:36 +00:00
Added use_classroom_owner_access Boolean variable to gam.cfg
This commit is contained in:
@@ -3,9 +3,10 @@
|
||||
- [Notes](#notes)
|
||||
- [Definitions](#definitions)
|
||||
- [Create classroom invitations](#create-classroom-invitations)
|
||||
- [Accept classroom invitations](#accept-classroom-invitations)
|
||||
- [Delete classroom invitations](#delete-classroom-invitations)
|
||||
- [Accept classroom invitations by user](#accept-classroom-invitations-by-user)
|
||||
- [Delete classroom invitations by user](#delete-classroom-invitations-by-user)
|
||||
- [Display classroom invitations by user](#display-classroom-invitations-by-user)
|
||||
- [Delete classroom invitations by course](#delete-classroom-invitations-by-course)
|
||||
- [Display classroom invitations by course](#display-classroom-invitations-by-course)
|
||||
|
||||
## API documentation
|
||||
@@ -24,8 +25,6 @@ Scope: https://www.googleapis.com/auth/classroom.rosters , Checked: FA
|
||||
```
|
||||
Follow the directions to authorize the Service Account scopes.
|
||||
|
||||
The Classroom API does not support inviting users from outside your domain.
|
||||
|
||||
## Definitions
|
||||
```
|
||||
<DomainName> ::= <String>(.<String>)+
|
||||
@@ -49,12 +48,18 @@ The Classroom API does not support inviting users from outside your domain.
|
||||
Invite users to classes.
|
||||
```
|
||||
gam <UserTypeEntity> create classroominvitation courses <CourseEntity> [role owner|student|teacher]
|
||||
[adminaccess|asadmin] [csvformat] [todrive <ToDriveAttributes>*] [formatjson [quotechar <Character>]]
|
||||
[adminaccess|asadmin]
|
||||
[csv|csvformat] [todrive <ToDriveAttributes>*] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
If `role` is not specified, `student` will be used.
|
||||
|
||||
You can only invite a co-teacher to be an owner of a course.
|
||||
|
||||
By default, classroom invitations are issued by the owner of the course, the `adminaccess` option causes the invitations to be issued by the admin named in `oauth2.txt`.
|
||||
|
||||
By default, when an invitation is created, GAM outputs details of the invitation as indented keywords and values.
|
||||
* `csv|csvformat [todrive <ToDriveAttribute>*] [formatjson [quotechar <Character>]]` - Output the details in CSV format.
|
||||
|
||||
### Example
|
||||
|
||||
Suppose you have a CSV file CourseStudent.csv with two columns: Course,Student.
|
||||
@@ -66,11 +71,13 @@ This command will invite all students to their courses in parallel
|
||||
```
|
||||
gam redirect stdout ./Invites.out multiprocess redirect stderr stdout multiprocess csv CourseStudent.csv gam user ~Student create classroominvitation role student course ~Course
|
||||
```
|
||||
## Accept classroom invitations
|
||||
Accept classroom invitations for users. You can only invite a co-teacher to be an owner of a course.
|
||||
## Accept classroom invitations by user
|
||||
Accept classroom invitations for users.
|
||||
```
|
||||
gam <UserTypeEntity> accept classroominvitation (ids <ClassroomInvitationIDEntity>)|([courses <CourseEntity>] [role all|owner|student|teacher])
|
||||
```
|
||||
`<UserTypeEntity>` must specify users in your domain.
|
||||
|
||||
By default, all invitations for the specified users will be accepted.
|
||||
|
||||
Select specific invitations to accept:
|
||||
@@ -81,11 +88,13 @@ Select courses and accept invitations for those courses.
|
||||
|
||||
By default, invitations for all roles will be accepted; you can limit the acceptances to invitations of a specific role.
|
||||
|
||||
## Delete classroom invitations
|
||||
## Delete classroom invitations by user
|
||||
Delete classroom invitations for users.
|
||||
```
|
||||
gam <UserTypeEntity> delete classroominvitation (ids <ClassroomInvitationIDEntity>)|([courses <CourseEntity>] [role all|owner|student|teacher])
|
||||
```
|
||||
`<UserTypeEntity>` must specify users in your domain.
|
||||
|
||||
By default, all invitations for the specified users will be deleted.
|
||||
|
||||
Select specific invitations to delete:
|
||||
@@ -104,8 +113,23 @@ gam <UserTypeEntity> show classroominvitations [role all|owner|student|teacher]
|
||||
gam <UserTypeEntity> print classroominvitations [todrive <ToDriveAttributes>*] [role all|owner|student|teacher]
|
||||
[formatjson [quotechar <Character>]]
|
||||
```
|
||||
`<UserTypeEntity>` must specify users in your domain.
|
||||
|
||||
By default, invitations for all roles will be displayed; you can limit the display to invitations of a specific role.
|
||||
|
||||
## Delete classroom invitations by course
|
||||
Delete classroom invitations for courses. This command must be used to delete non-domain member invitations.
|
||||
```
|
||||
gam delete classroominvitation courses <CourseEntity> (ids <ClassroomInvitationIDEntity>)|(role all|owner|student|teacher)
|
||||
```
|
||||
Select courses and delete invitations for those courses.
|
||||
* `courses <CourseEntity>` - Specify courses
|
||||
|
||||
Select specific invitations to delete:
|
||||
* `ids <ClassroomInvitationIDEntity>` - Specify invitation IDs
|
||||
|
||||
Select invitations to delete by role. By default, invitations for all roles will be deleted; you can limit the deletions to invitations of a specific role.
|
||||
|
||||
## Display classroom invitations by course
|
||||
```
|
||||
gam show classroominvitations (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
|
||||
|
||||
@@ -48,10 +48,7 @@ The `quotechar <Character>` option allows you to choose an alternate quote chara
|
||||
## Display File Ownership for Old files
|
||||
If the above commands fail, you can try to loop through all accounts, however this might take a long time if you are on a large Google Workspace Account.
|
||||
|
||||
```
|
||||
gam config auto_batch_min 1 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select id <DriveFileID> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
```
|
||||
Starting with version 6.07.26, this can be made more efficient by terminating processing after the owner is identified.
|
||||
```
|
||||
gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select id <DriveFileID> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select name <DriveFileName> fields id,name,owners.emailaddress norecursion showownedby any
|
||||
```
|
||||
|
||||
@@ -10,6 +10,26 @@ Add the `-s` option to the end of the above commands to suppress creating the `g
|
||||
|
||||
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation
|
||||
|
||||
### 6.69.00
|
||||
|
||||
Added `use_classroom_owner_access` Boolean variable to `gam.cfg` that controls how GAM gets
|
||||
classroom member information and removes students/teachers. Client access does not provide
|
||||
complete information about non-domain students/teachers.
|
||||
* `False` - Use client access; this is the default. Use if you don't have non-domain members in your courses.
|
||||
* `True` - Use service account access as the classroom owner. An extra API call is required per course to authenticate the owner; this will affect performance
|
||||
|
||||
Added the following command which must be used to delete classroom invitations for non-domain students/teachers.
|
||||
```
|
||||
gam delete classroominvitation courses <CourseEntity> (ids <ClassroomInvitationIDEntity>)|(role all|owner|student|teacher)
|
||||
```
|
||||
You can obtain the classroom invitation IDs with these commands:
|
||||
```
|
||||
gam show classroominvitations (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
|
||||
[role all|owner|student|teacher] [formatjson]
|
||||
gam print classroominvitations [todrive <ToDriveAttribute>*] (course|class <CourseEntity>)*|([teacher <UserItem>] [student <UserItem>] [states <CourseStateList>])
|
||||
[role all|owner|student|teacher] [formatjson [quotechar <Character>]]
|
||||
```
|
||||
|
||||
### 6.68.08
|
||||
|
||||
Updated `gam <UserTypeEntity> print filelist|drivefileacls|shareddriveacls ... oneitemperrow` to print
|
||||
|
||||
@@ -334,7 +334,7 @@ writes the credentials into the file oauth2.txt.
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
|
||||
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.68.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.69.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -1002,7 +1002,7 @@ writes the credentials into the file oauth2.txt.
|
||||
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
||||
C:\GAMADV-XTD3>gam version
|
||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||
GAMADV-XTD3 6.68.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.69.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
Windows-10-10.0.17134 AMD64
|
||||
|
||||
@@ -13,3 +13,4 @@ Thank you.
|
||||
* Goldy Arora - https://www.goldyarora.com/license-notifier/
|
||||
* Paul Ogier (Taming.Tech) - GAMADV-XTD3 Tutorials https://www.youtube.com/watch?v=g9LDeyXQNLI&list=PL_dLiK09pJVhKJxZHNk9CHK0q5hkZ856w
|
||||
* Paul Ogier (Taming.Tech) - GAMADV-XTD3 Course on Udemy https://taming.tech/GAMCourse
|
||||
* Paul Ogier (Taming.Tech) - https://taming.tech/taming-gam-a-practical-guide-to-gam-and-gamadv-xtd3/
|
||||
@@ -3,7 +3,7 @@
|
||||
Print the current version of Gam with details
|
||||
```
|
||||
gam version
|
||||
GAMADV-XTD3 6.68.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.69.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -15,7 +15,7 @@ Time: 2023-06-02T21:10:00-07:00
|
||||
Print the current version of Gam with details and time offset information
|
||||
```
|
||||
gam version timeoffset
|
||||
GAMADV-XTD3 6.68.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.69.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -27,7 +27,7 @@ Your system time differs from www.googleapis.com by less than 1 second
|
||||
Print the current version of Gam with extended details and SSL information
|
||||
```
|
||||
gam version extended
|
||||
GAMADV-XTD3 6.68.08 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
GAMADV-XTD3 6.69.00 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
||||
Path: /Users/Admin/bin/gamadv-xtd3
|
||||
Version Check:
|
||||
Current: 5.35.08
|
||||
Latest: 6.68.08
|
||||
Latest: 6.69.00
|
||||
echo $?
|
||||
1
|
||||
```
|
||||
@@ -72,7 +72,7 @@ echo $?
|
||||
Print the current version number without details
|
||||
```
|
||||
gam version simple
|
||||
6.68.08
|
||||
6.69.00
|
||||
```
|
||||
In Linux/MacOS you can do:
|
||||
```
|
||||
@@ -82,7 +82,7 @@ echo $VER
|
||||
Print the current version of Gam and address of this Wiki
|
||||
```
|
||||
gam help
|
||||
GAM 6.68.08 - https://github.com/taers232c/GAMADV-XTD3
|
||||
GAM 6.69.00 - https://github.com/taers232c/GAMADV-XTD3
|
||||
Ross Scroggs <ross.scroggs@gmail.com>
|
||||
Python 3.12.2 64-bit final
|
||||
MacOS Sonoma 14.2.1 x86_64
|
||||
|
||||
@@ -150,7 +150,7 @@ csv_input_column_delimiter
|
||||
Default: ','
|
||||
csv_input_no_escape_char
|
||||
When reading a CSV file, should `\` be ignored as an escape character.
|
||||
Set this to False if the input file data was written using `\` as an escape character.
|
||||
Set this to False if the input file data was written using `\` as an escape character.
|
||||
Default: True
|
||||
csv_input_quote_char
|
||||
A one-character string used to quote fields containing special characters,
|
||||
@@ -220,7 +220,7 @@ csv_output_line_terminator
|
||||
Default: lf
|
||||
csv_output_no_escape_char
|
||||
When writing a CSV file, should `\` be ignored as an escape character.
|
||||
Set this to True if the output file data is to be read by a non-Python program.
|
||||
Set this to True if the output file data is to be read by a non-Python program.
|
||||
Default: False
|
||||
csv_output_quote_char
|
||||
A one-character string used to quote fields containing special characters,
|
||||
@@ -420,23 +420,23 @@ print_agu_domains
|
||||
gam print groups
|
||||
gam print|show group-members
|
||||
gam print users
|
||||
This allows predefining the list of domains so they don't have to be specified in each command.
|
||||
This allows predefining the list of domains so they don't have to be specified in each command.
|
||||
Default: Blank
|
||||
print_cros_ous
|
||||
A comma separated list of org unit that are used in these commands:
|
||||
gam print cros
|
||||
gam print crosactivity
|
||||
This allows predefining the list of org units so they don't have to be specified in each command.
|
||||
This allows predefining the list of org units so they don't have to be specified in each command.
|
||||
Default: Blank
|
||||
print_cros_ous_and_children
|
||||
A comma separated list of org unit names that are used in these commands:
|
||||
gam print cros
|
||||
gam print crosactivity
|
||||
This allows predefining the list of org units so they don't have to be specified in each command.
|
||||
This allows predefining the list of org units so they don't have to be specified in each command.
|
||||
Default: Blank
|
||||
process_wait_limit
|
||||
When processing batch/CSV files, how long (in seconds) GAM should wait for all batch|csv processes to complete
|
||||
after all have been started. If the limit is reached, GAM terminates any remaining processes.
|
||||
When processing batch/CSV files, how long (in seconds) GAM should wait for all batch|csv processes to complete
|
||||
after all have been started. If the limit is reached, GAM terminates any remaining processes.
|
||||
Default: 0: no limit
|
||||
Range: 0 - Unlimited
|
||||
quick_cros_move
|
||||
@@ -573,6 +573,13 @@ update_cros_ou_with_id
|
||||
Set to true if you are getting the following error:
|
||||
`400: invalidInput - Invalid Input: Inconsistent Orgunit id and path in request`
|
||||
Default: False
|
||||
use_classroom_owner_access
|
||||
How is classroom member information obtained and how are classroom members deleted.
|
||||
Client access does not provide complete information about non-domain students/teachers.
|
||||
When False, GAM uses client access to get classroom member information and to delete members
|
||||
When True, GAM uses service account access as the classroom owner.
|
||||
An extra API call is required per course to authenticate the owner
|
||||
Default: False
|
||||
use_projectid_as_name
|
||||
When False, new projects have a default project name of "GAM Project"
|
||||
and a default app name of "GAM".
|
||||
|
||||
Reference in New Issue
Block a user