-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated
<PeopleContactAttribute>
fields address,email,phone,url
t…
…o allow an empty type field.
- Loading branch information
Showing
10 changed files
with
90 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,16 @@ Add the `-s` option to the end of the above commands to suppress creating the `g | |
|
||
See [Downloads-Installs](https://github.com/taers232c/GAMADV-XTD3/wiki/Downloads-Installs) for Windows or other options, including manual installation | ||
|
||
### 7.00.07 | ||
|
||
Updated `<PeopleContactAttribute>` fields `address,email,phone,url` to allow an empty type field. | ||
``` | ||
address "" formatted "My Address" primary | ||
email "" [email protected] primary | ||
phone "" "510-555-1212" primary | ||
url "" "https://www.domain.com" primary | ||
``` | ||
|
||
### 7.00.06 | ||
|
||
Updated `gam <UserTypeEntity> create|update chatspace` to support the new permissions settings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,7 +251,7 @@ writes the credentials into the file oauth2.txt. | |
admin@server:/Users/admin$ rm -f /Users/admin/GAMConfig/oauth2.txt | ||
admin@server:/Users/admin$ 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 7.00.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
GAMADV-XTD3 7.00.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
Ross Scroggs <[email protected]> | ||
Python 3.12.6 64-bit final | ||
MacOS Sonoma 14.5 x86_64 | ||
|
@@ -923,7 +923,7 @@ writes the credentials into the file oauth2.txt. | |
C:\>del C:\GAMConfig\oauth2.txt | ||
C:\>gam version | ||
WARNING: Config File: C:\GAMConfig\gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: C:\GAMConfig\oauth2.txt, Not Found | ||
GAMADV-XTD3 7.00.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
GAMADV-XTD3 7.00.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
Ross Scroggs <[email protected]> | ||
Python 3.12.6 64-bit final | ||
Windows-10-10.0.17134 AMD64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,8 +125,15 @@ gam user [email protected] check serviceaccount | |
(subject <String>)| | ||
(suffix <String>)| | ||
(userdefinedfield clear|(<String> <String>))| | ||
(website clear|(app_install_page|blog|ftp|home|home_page|other|profile|reservations|work|<String> <URL> notprimary|primary)) | ||
(url|website clear|(app_install_page|blog|ftp|home|home_page|other|profile|reservations|work|<String> <URL> notprimary|primary)) | ||
For address, email, phone and url, the type <String> can be empty. | ||
address "" formatted "My Address" primary | ||
email "" [email protected] primary | ||
phone "" "510-555-1212" primary | ||
url "" "https://www.domain.com" primary | ||
``` | ||
``` | ||
<PeopleFieldName> ::= | ||
addresses| | ||
ageranges| | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
Print the current version of Gam with details | ||
``` | ||
gam version | ||
GAMADV-XTD3 7.00.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
GAMADV-XTD3 7.00.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
Ross Scroggs <[email protected]> | ||
Python 3.12.5 64-bit final | ||
MacOS Sonoma 14.5 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 7.00.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
GAMADV-XTD3 7.00.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
Ross Scroggs <[email protected]> | ||
Python 3.12.5 64-bit final | ||
MacOS Sonoma 14.5 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 7.00.06 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
GAMADV-XTD3 7.00.07 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource | ||
Ross Scroggs <[email protected]> | ||
Python 3.12.5 64-bit final | ||
MacOS Sonoma 14.5 x86_64 | ||
|
@@ -64,15 +64,15 @@ MacOS High Sierra 10.13.6 x86_64 | |
Path: /Users/Admin/bin/gamadv-xtd3 | ||
Version Check: | ||
Current: 5.35.08 | ||
Latest: 7.00.06 | ||
Latest: 7.00.07 | ||
echo $? | ||
1 | ||
``` | ||
|
||
Print the current version number without details | ||
``` | ||
gam version simple | ||
7.00.06 | ||
7.00.07 | ||
``` | ||
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 7.00.06 - https://github.com/taers232c/GAMADV-XTD3 | ||
GAM 7.00.07 - https://github.com/taers232c/GAMADV-XTD3 | ||
Ross Scroggs <[email protected]> | ||
Python 3.12.5 64-bit final | ||
MacOS Sonoma 14.5 x86_64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
7.00.07 | ||
|
||
Updated `<PeopleContactAttribute>` fields `address,email,phone,url` to allow an empty type field. | ||
``` | ||
address "" formatted "My Address" primary | ||
email "" [email protected] primary | ||
phone "" "510-555-1212" primary | ||
url "" "https://www.domain.com" primary | ||
``` | ||
|
||
7.00.06 | ||
|
||
Updated `gam <UserTypeEntity> create|update chatspace` to support the new permissions settings | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# GAM | ||
# GAM7 | ||
# | ||
# Copyright 2024, All Rights Reserved. | ||
# | ||
|
@@ -25,7 +25,7 @@ | |
""" | ||
|
||
__author__ = 'GAM Team <[email protected]>' | ||
__version__ = '7.00.06' | ||
__version__ = '7.00.07' | ||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' | ||
|
||
#pylint: disable=wrong-import-position | ||
|
@@ -20710,6 +20710,9 @@ class PeopleManager(): | |
} | ||
} | ||
|
||
# Fields that allow an empty type | ||
EMPTY_TYPE_ALLOWED_FIELDS = {PEOPLE_ADDRESSES, PEOPLE_EMAIL_ADDRESSES, PEOPLE_PHONE_NUMBERS, PEOPLE_URLS} | ||
|
||
# Fields with just a URL | ||
# URL_FIELDS = { | ||
# PEOPLE_COVER_PHOTOS, | ||
|
@@ -20753,14 +20756,14 @@ def GetSingleFieldEntry(fieldName): | |
person[fieldName].append({}) | ||
return person[fieldName][0] | ||
|
||
def InitArrayFieldEntry(choices): | ||
def InitArrayFieldEntry(choices, typeMinLen=1): | ||
entry = {'metadata': {'primary': False}} | ||
if choices is not None: | ||
ftype = getChoice(choices, mapChoice=True, defaultChoice=None) | ||
if ftype: | ||
entry['type'] = ftype | ||
else: | ||
entry['type'] = getString(Cmd.OB_STRING) | ||
entry['type'] = getString(Cmd.OB_STRING, minLen=typeMinLen) | ||
return entry | ||
|
||
def GetMultiFieldEntry(fieldName): | ||
|
@@ -20811,7 +20814,7 @@ def AppendArrayEntryToFields(fieldName, entry, checkBlankField=None): | |
if fieldName == PEOPLE_ADDRESSES: | ||
if CheckClearPersonField(fieldName): | ||
continue | ||
entry = InitArrayFieldEntry(PeopleManager.TYPE_VALUE_PNP_FIELDS[fieldName]) | ||
entry = InitArrayFieldEntry(PeopleManager.TYPE_VALUE_PNP_FIELDS[fieldName], typeMinLen=0) | ||
while Cmd.ArgumentsRemaining(): | ||
argument = getArgument() | ||
if argument in PeopleManager.ADDRESS_ARGUMENT_TO_FIELD_MAP: | ||
|
@@ -20892,7 +20895,8 @@ def AppendArrayEntryToFields(fieldName, entry, checkBlankField=None): | |
elif fieldName in PeopleManager.TYPE_VALUE_PNP_FIELDS: | ||
if CheckClearPersonField(fieldName): | ||
continue | ||
entry = InitArrayFieldEntry(PeopleManager.TYPE_VALUE_PNP_FIELDS[fieldName]) | ||
entry = InitArrayFieldEntry(PeopleManager.TYPE_VALUE_PNP_FIELDS[fieldName], | ||
typeMinLen=0 if fieldName in PeopleManager.EMPTY_TYPE_ALLOWED_FIELDS else 1) | ||
if fieldName == PEOPLE_IM_CLIENTS: | ||
checkBlankField = None | ||
entry['protocol'] = getChoice(PeopleManager.IM_PROTOCOLS, mapChoice=True) | ||
|
@@ -71962,14 +71966,16 @@ def _processSendAs(user, i, count, entityType, emailAddress, j, jcount, gmail, f | |
result = callGAPI(gmail.users().settings().sendAs(), function, | ||
throwReasons=GAPI.GMAIL_THROW_REASONS+[GAPI.NOT_FOUND, GAPI.ALREADY_EXISTS, GAPI.DUPLICATE, | ||
GAPI.CANNOT_DELETE_PRIMARY_SENDAS, GAPI.INVALID_ARGUMENT, | ||
GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED], | ||
GAPI.FAILED_PRECONDITION, GAPI.PERMISSION_DENIED, | ||
GAPI.INSUFFICIENT_PERMISSIONS], | ||
userId='me', **kwargs) | ||
if function == 'get': | ||
_showSendAs(result, j, jcount, sigReplyFormat, verifyOnly) | ||
else: | ||
entityActionPerformed([Ent.USER, user, entityType, emailAddress], j, jcount) | ||
except (GAPI.notFound, GAPI.alreadyExists, GAPI.duplicate, | ||
GAPI.cannotDeletePrimarySendAs, GAPI.invalidArgument, GAPI.failedPrecondition, GAPI.permissionDenied) as e: | ||
GAPI.cannotDeletePrimarySendAs, GAPI.invalidArgument, | ||
GAPI.failedPrecondition, GAPI.permissionDenied, GAPI.insufficientPermissions) as e: | ||
entityActionFailedWarning([Ent.USER, user, entityType, emailAddress], str(e), j, jcount) | ||
except (GAPI.serviceNotAvailable, GAPI.badRequest): | ||
entityServiceNotApplicableWarning(Ent.USER, user, i, count) | ||
|