mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Allow external members in chat spaces
This commit is contained in:
@@ -10,6 +10,13 @@ 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.
|
See [Downloads](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads) for Windows or other options, including manual installation.
|
||||||
|
|
||||||
|
### 6.63.03
|
||||||
|
|
||||||
|
Added option `externalusersallowed <Boolean>` to `gam <UserTypeEntity> create chatspace`
|
||||||
|
that allows creation of chat spaces that allow external users.
|
||||||
|
|
||||||
|
Updated commands that process chat members to allow external users.
|
||||||
|
|
||||||
### 6.63.02
|
### 6.63.02
|
||||||
|
|
||||||
Fixed bug in `gam <UserTypeEntity> collect orphans` where shortcuts were being created unnecessarily
|
Fixed bug in `gam <UserTypeEntity> collect orphans` where shortcuts were being created unnecessarily
|
||||||
|
|||||||
@@ -330,7 +330,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$ rm -f /Users/admin/GAMConfig/oauth2.txt
|
||||||
admin@server:/Users/admin/bin/gamadv-xtd3$ ./gam version
|
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
|
WARNING: Config File: /Users/admin/GAMConfig/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/admin/GAMConfig/oauth2.txt, Not Found
|
||||||
GAMADV-XTD3 6.63.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.63.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.10.8 64-bit final
|
Python 3.10.8 64-bit final
|
||||||
MacOS High Sierra 10.13.6 x86_64
|
MacOS High Sierra 10.13.6 x86_64
|
||||||
@@ -972,7 +972,7 @@ writes the credentials into the file oauth2.txt.
|
|||||||
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
C:\GAMADV-XTD3>del C:\GAMConfig\oauth2.txt
|
||||||
C:\GAMADV-XTD3>gam version
|
C:\GAMADV-XTD3>gam version
|
||||||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found
|
||||||
GAMADV-XTD3 6.63.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.63.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.11.4 64-bit final
|
Python 3.11.4 64-bit final
|
||||||
Windows-10-10.0.17134 AMD64
|
Windows-10-10.0.17134 AMD64
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ Google requires that you have a Chat Bot configured in order to use the Chat API
|
|||||||
```
|
```
|
||||||
gam <UserTypeEntity> create chatspace
|
gam <UserTypeEntity> create chatspace
|
||||||
[type <ChatSpaceType>]
|
[type <ChatSpaceType>]
|
||||||
|
[externalusersrallowed <Boolean>]
|
||||||
[members <UserTypeEntity>]
|
[members <UserTypeEntity>]
|
||||||
[displayname <String>]
|
[displayname <String>]
|
||||||
[description <String>] [guidelines <String>]
|
[description <String>] [guidelines <String>]
|
||||||
|
|||||||
@@ -1006,7 +1006,7 @@ The `labels` column indicates the number of drive labels a file has and there ar
|
|||||||
```
|
```
|
||||||
...labels,labelsIds,...
|
...labels,labelsIds,...
|
||||||
```
|
```
|
||||||
The `labels` column indicates the number of drive labels a file has and the `labelssIds` column is a list of the drive label IDs
|
The `labels` column indicates the number of drive labels a file has and the `labelsIds` column is a list of the drive label IDs
|
||||||
separated by `delimiter <Character>`; the default value is `csv_output_field_delimiter` from `gam.cfg`.
|
separated by `delimiter <Character>`; the default value is `csv_output_field_delimiter` from `gam.cfg`.
|
||||||
|
|
||||||
By default, all ACLS are displayed; use the following option in conjunction with `<PermissionMatch>* [<PermissionMatchAction>]`
|
By default, all ACLS are displayed; use the following option in conjunction with `<PermissionMatch>* [<PermissionMatchAction>]`
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Print the current version of Gam with details
|
Print the current version of Gam with details
|
||||||
```
|
```
|
||||||
gam version
|
gam version
|
||||||
GAMADV-XTD3 6.63.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.63.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.11.4 64-bit final
|
Python 3.11.4 64-bit final
|
||||||
MacOS Monterey 12.6.6 x86_64
|
MacOS Monterey 12.6.6 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
|
Print the current version of Gam with details and time offset information
|
||||||
```
|
```
|
||||||
gam version timeoffset
|
gam version timeoffset
|
||||||
GAMADV-XTD3 6.63.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.63.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.11.4 64-bit final
|
Python 3.11.4 64-bit final
|
||||||
MacOS Monterey 12.6.6 x86_64
|
MacOS Monterey 12.6.6 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
|
Print the current version of Gam with extended details and SSL information
|
||||||
```
|
```
|
||||||
gam version extended
|
gam version extended
|
||||||
GAMADV-XTD3 6.63.01 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
GAMADV-XTD3 6.63.03 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.11.4 64-bit final
|
Python 3.11.4 64-bit final
|
||||||
MacOS Monterey 12.6.6 x86_64
|
MacOS Monterey 12.6.6 x86_64
|
||||||
@@ -64,7 +64,7 @@ MacOS High Sierra 10.13.6 x86_64
|
|||||||
Path: /Users/Admin/bin/gamadv-xtd3
|
Path: /Users/Admin/bin/gamadv-xtd3
|
||||||
Version Check:
|
Version Check:
|
||||||
Current: 5.35.08
|
Current: 5.35.08
|
||||||
Latest: 6.63.01
|
Latest: 6.63.03
|
||||||
echo $?
|
echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
@@ -72,7 +72,7 @@ echo $?
|
|||||||
Print the current version number without details
|
Print the current version number without details
|
||||||
```
|
```
|
||||||
gam version simple
|
gam version simple
|
||||||
6.63.01
|
6.63.03
|
||||||
```
|
```
|
||||||
In Linux/MacOS you can do:
|
In Linux/MacOS you can do:
|
||||||
```
|
```
|
||||||
@@ -82,7 +82,7 @@ echo $VER
|
|||||||
Print the current version of Gam and address of this Wiki
|
Print the current version of Gam and address of this Wiki
|
||||||
```
|
```
|
||||||
gam help
|
gam help
|
||||||
GAM 6.63.01 - https://github.com/taers232c/GAMADV-XTD3
|
GAM 6.63.03 - https://github.com/taers232c/GAMADV-XTD3
|
||||||
Ross Scroggs <ross.scroggs@gmail.com>
|
Ross Scroggs <ross.scroggs@gmail.com>
|
||||||
Python 3.11.4 64-bit final
|
Python 3.11.4 64-bit final
|
||||||
MacOS Monterey 12.6.6 x86_64
|
MacOS Monterey 12.6.6 x86_64
|
||||||
|
|||||||
@@ -5719,6 +5719,7 @@ gam <UserTypeEntity> print workinglocation
|
|||||||
|
|
||||||
gam <UserTypeEntity> create chatspace
|
gam <UserTypeEntity> create chatspace
|
||||||
[type <ChatSpaceType>]
|
[type <ChatSpaceType>]
|
||||||
|
[externalusersrallowed <Boolean>]
|
||||||
[members <UserTypeEntity>]
|
[members <UserTypeEntity>]
|
||||||
[displayname <String>]
|
[displayname <String>]
|
||||||
[description <String>] [guidelines <String>]
|
[description <String>] [guidelines <String>]
|
||||||
|
|||||||
@@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
Merged GAM-Team version
|
Merged GAM-Team version
|
||||||
|
|
||||||
|
6.63.03
|
||||||
|
|
||||||
|
Added option `externalusersallowed <Boolean>` to `gam <UserTypeEntity> create chatspace`
|
||||||
|
that allows creation of chat spaces that allow external users.
|
||||||
|
|
||||||
|
Updated commands that process chat members to allow external users.
|
||||||
|
|
||||||
6.63.02
|
6.63.02
|
||||||
|
|
||||||
Fixed bug in `gam <UserTypeEntity> collect orphans` where shortcuts were being created unnecessarily
|
Fixed bug in `gam <UserTypeEntity> collect orphans` where shortcuts were being created unnecessarily
|
||||||
|
|||||||
@@ -24442,6 +24442,7 @@ CHAT_SPACE_MIN_MAX_MEMBERS = {
|
|||||||
}
|
}
|
||||||
# gam <UserTypeEntity> create chatspace
|
# gam <UserTypeEntity> create chatspace
|
||||||
# [type <ChatSpaceType>]
|
# [type <ChatSpaceType>]
|
||||||
|
# [externalusersallowed <Boolean>]
|
||||||
# [members <UserTypeEntity>]
|
# [members <UserTypeEntity>]
|
||||||
# [displayname <String>]
|
# [displayname <String>]
|
||||||
# [description <String>] [guidelines|rules <String>]
|
# [description <String>] [guidelines|rules <String>]
|
||||||
@@ -24449,7 +24450,6 @@ CHAT_SPACE_MIN_MAX_MEMBERS = {
|
|||||||
# [<ChatContent>]
|
# [<ChatContent>]
|
||||||
# [formatjson|returnidonly]
|
# [formatjson|returnidonly]
|
||||||
def createChatSpace(users):
|
def createChatSpace(users):
|
||||||
cd = buildGAPIObject(API.DIRECTORY)
|
|
||||||
FJQC = FormatJSONQuoteChar()
|
FJQC = FormatJSONQuoteChar()
|
||||||
body = {'space': {'spaceType': CHAT_SPACE_TYPE_MAP['space'], 'displayName': ''},
|
body = {'space': {'spaceType': CHAT_SPACE_TYPE_MAP['space'], 'displayName': ''},
|
||||||
'requestId': str(uuid.uuid4()),
|
'requestId': str(uuid.uuid4()),
|
||||||
@@ -24461,6 +24461,8 @@ def createChatSpace(users):
|
|||||||
myarg = getArgument()
|
myarg = getArgument()
|
||||||
if getChatSpaceParameters(myarg, body['space'], CHAT_SPACE_TYPE_MAP):
|
if getChatSpaceParameters(myarg, body['space'], CHAT_SPACE_TYPE_MAP):
|
||||||
pass
|
pass
|
||||||
|
elif myarg == 'externalusersallowed':
|
||||||
|
body['space']['externalUserAllowed'] = getBoolean()
|
||||||
elif myarg == 'members':
|
elif myarg == 'members':
|
||||||
_, members = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS)
|
_, members = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS)
|
||||||
elif myarg == 'returnidonly':
|
elif myarg == 'returnidonly':
|
||||||
@@ -24480,7 +24482,7 @@ def createChatSpace(users):
|
|||||||
CHAT_SPACE_MIN_MAX_MEMBERS[spaceType]['max']))
|
CHAT_SPACE_MIN_MAX_MEMBERS[spaceType]['max']))
|
||||||
mtype = CHAT_MEMBER_TYPE_MAP['human']
|
mtype = CHAT_MEMBER_TYPE_MAP['human']
|
||||||
for member in members:
|
for member in members:
|
||||||
name = convertEmailAddressToUID(member, cd, 'user')
|
name = normalizeEmailAddressOrUID(member)
|
||||||
body['memberships'].append({'member': {'name': f'users/{name}', 'type': mtype}})
|
body['memberships'].append({'member': {'name': f'users/{name}', 'type': mtype}})
|
||||||
if spaceType == 'SPACE':
|
if spaceType == 'SPACE':
|
||||||
if not body['space']['displayName']:
|
if not body['space']['displayName']:
|
||||||
@@ -24801,7 +24803,7 @@ def createChatMember(users):
|
|||||||
parent = getChatSpace(myarg)
|
parent = getChatSpace(myarg)
|
||||||
elif myarg == 'user':
|
elif myarg == 'user':
|
||||||
userList.append(getEmailAddress(returnUIDprefix='uid:'))
|
userList.append(getEmailAddress(returnUIDprefix='uid:'))
|
||||||
elif myarg == 'members':
|
elif myarg in {'member', 'members'}:
|
||||||
_, members = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS)
|
_, members = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS)
|
||||||
userList.extend(members)
|
userList.extend(members)
|
||||||
elif myarg == 'type':
|
elif myarg == 'type':
|
||||||
@@ -24816,7 +24818,7 @@ def createChatMember(users):
|
|||||||
missingArgumentExit('user|members')
|
missingArgumentExit('user|members')
|
||||||
userMembers = []
|
userMembers = []
|
||||||
for user in userList:
|
for user in userList:
|
||||||
name = convertEmailAddressToUID(user, cd, 'user')
|
name = normalizeEmailAddressOrUID(user)
|
||||||
userMembers.append({'member': {'name': f'users/{name}', 'type': mtype}})
|
userMembers.append({'member': {'name': f'users/{name}', 'type': mtype}})
|
||||||
i, count, users = getEntityArgument(users)
|
i, count, users = getEntityArgument(users)
|
||||||
for user in users:
|
for user in users:
|
||||||
@@ -24830,7 +24832,6 @@ def createChatMember(users):
|
|||||||
# ((user <UserItem>)|(members <UserTypeEntity>))+
|
# ((user <UserItem>)|(members <UserTypeEntity>))+
|
||||||
# gam <UserTypeEntity> remove chatmember members <ChatMemberList>
|
# gam <UserTypeEntity> remove chatmember members <ChatMemberList>
|
||||||
def deleteChatMember(users):
|
def deleteChatMember(users):
|
||||||
cd = buildGAPIObject(API.DIRECTORY)
|
|
||||||
action = Act.Get()
|
action = Act.Get()
|
||||||
parent = None
|
parent = None
|
||||||
memberNames = []
|
memberNames = []
|
||||||
@@ -24847,7 +24848,7 @@ def deleteChatMember(users):
|
|||||||
parent = getChatSpace(myarg)
|
parent = getChatSpace(myarg)
|
||||||
elif myarg == 'user':
|
elif myarg == 'user':
|
||||||
userList.append(getEmailAddress(returnUIDprefix='uid:'))
|
userList.append(getEmailAddress(returnUIDprefix='uid:'))
|
||||||
elif myarg == 'members':
|
elif myarg in {'member', 'members'}:
|
||||||
_, members = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS)
|
_, members = getEntityToModify(defaultEntityType=Cmd.ENTITY_USERS)
|
||||||
userList.extend(members)
|
userList.extend(members)
|
||||||
else:
|
else:
|
||||||
@@ -24861,7 +24862,7 @@ def deleteChatMember(users):
|
|||||||
if not userList:
|
if not userList:
|
||||||
missingArgumentExit('user|members')
|
missingArgumentExit('user|members')
|
||||||
for user in userList:
|
for user in userList:
|
||||||
name = convertEmailAddressToUID(user, cd, 'user')
|
name = normalizeEmailAddressOrUID(user)
|
||||||
memberNames.append(f'{parent}/members/{name}')
|
memberNames.append(f'{parent}/members/{name}')
|
||||||
i, count, users = getEntityArgument(users)
|
i, count, users = getEntityArgument(users)
|
||||||
for user in users:
|
for user in users:
|
||||||
|
|||||||
Reference in New Issue
Block a user