Added use_chat_admin_access Boolean variable to gam.cfg.

This commit is contained in:
Ross Scroggs
2024-06-20 17:06:53 -07:00
parent e18eb0931e
commit c12ee6438c
5 changed files with 27 additions and 1 deletions

View File

@@ -38,6 +38,14 @@ gam <UserItem> print|show chatmembers|asadmin
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat
Added `use_chat_admin_access` Boolean variable to `gam.cfg`.
```
* When False, GAM uses user access when making all Chat API calls. For calls that support admin access,
this can be overridden with the asadmin command line option.
* When True, GAM uses admin access for Chat API calls that support admin access; other calls will use user access.
* Default: False
```
### 6.76.15
Fixed bug in `gam <UserTypeEntity> print|show filesharecounts summary only summaryuser <String>`

View File

@@ -589,6 +589,12 @@ 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_chat_admin_access
When False, GAM uses user access when making Chat API calls. For calls that support admin access,
this can be overridden with the asadmin command line option.
When True, GAM uses admin access for Chat API calls that support admin access;
other calls will use user access.
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.

View File

@@ -30,6 +30,14 @@ gam <UserItem> print|show chatmembers|asadmin
* See: https://github.com/taers232c/GAMADV-XTD3/wiki/Users-Chat
Added `use_chat_admin_access` Boolean variable to `gam.cfg`.
```
* When False, GAM uses user access when making all Chat API calls. For calls that support admin access,
this can be overridden with the asadmin command line option.
* When True, GAM uses admin access for Chat API calls that support admin access; other calls will use user access.
* Default: False
```
6.76.15
Fixed bug in `gam <UserTypeEntity> print|show filesharecounts summary only summaryuser <String>`

View File

@@ -25163,7 +25163,7 @@ def exitIfChatNotConfigured(chat, kvList, errMsg, i, count):
entityActionFailedWarning(kvList, errMsg, i, count)
def _getChatAdminAccess(adminAPI, userAPI):
if checkArgumentPresent(ADMIN_ACCESS_OPTIONS):
if checkArgumentPresent(ADMIN_ACCESS_OPTIONS) or GC.Values[GC.USE_CHAT_ADMIN_ACCESS]:
return (True, adminAPI)
return (False, userAPI)

View File

@@ -292,6 +292,8 @@ TODRIVE_USER = 'todrive_user'
TRUNCATE_CLIENT_ID = 'truncate_client_id'
# Update CrOS org unit with orgUnitId
UPDATE_CROS_OU_WITH_ID = 'update_cros_ou_with_id'
# Use chat asadmin where possible
USE_CHAT_ADMIN_ACCESS = 'use_chat_admin_access'
# Use course owner for course access
USE_COURSE_OWNER_ACCESS = 'use_course_owner_access'
# Use Project ID as Project Name and App Name
@@ -434,6 +436,7 @@ Defaults = {
TODRIVE_USER: '',
TRUNCATE_CLIENT_ID: FALSE,
UPDATE_CROS_OU_WITH_ID: FALSE,
USE_CHAT_ADMIN_ACCESS: FALSE,
USE_COURSE_OWNER_ACCESS: FALSE,
USE_PROJECTID_AS_NAME: FALSE,
USER_MAX_RESULTS: '500',
@@ -595,6 +598,7 @@ VAR_INFO = {
TODRIVE_USER: {VAR_TYPE: TYPE_STRING, VAR_LIMITS: (0, None)},
TRUNCATE_CLIENT_ID: {VAR_TYPE: TYPE_BOOLEAN},
UPDATE_CROS_OU_WITH_ID: {VAR_TYPE: TYPE_BOOLEAN},
USE_CHAT_ADMIN_ACCESS: {VAR_TYPE: TYPE_BOOLEAN},
USE_COURSE_OWNER_ACCESS: {VAR_TYPE: TYPE_BOOLEAN},
USE_PROJECTID_AS_NAME: {VAR_TYPE: TYPE_BOOLEAN},
USER_MAX_RESULTS: {VAR_TYPE: TYPE_INTEGER, VAR_LIMITS: (1, 500)},