Updated <UserMultiAttribute>.location.buildingid <String> to allow non-validated building IDs

This commit is contained in:
Ross Scroggs
2024-03-09 07:06:45 -08:00
parent f88a125966
commit be0eff7e14
7 changed files with 35 additions and 11 deletions

View File

@@ -10,6 +10,11 @@ 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.71.23
Updated `<UserMultiAttribute>.location.buildingid <String>` to allow non-validated building IDs
by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X' sets the building ID to `Building X`.
### 6.71.12 ### 6.71.12
Added option `showmimetype category <MimeTypeNameList>` to `gam <UserTypeEntity> print|show filecounts|filelist|filetree` Added option `showmimetype category <MimeTypeNameList>` to `gam <UserTypeEntity> print|show filecounts|filelist|filetree`

View File

@@ -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$ 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.71.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.71.13 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64 MacOS Sonoma 14.2.1 x86_64
@@ -1006,7 +1006,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.71.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.71.13 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final Python 3.12.2 64-bit final
Windows-10-10.0.17134 AMD64 Windows-10-10.0.17134 AMD64

View File

@@ -1,4 +1,5 @@
# Users - Gmail - Messages/Threads # Users - Gmail - Messages/Threads
_ [Notes](#notes)
- [API documentation](#api-documentation) - [API documentation](#api-documentation)
- [Query documentation](#query-documentation) - [Query documentation](#query-documentation)
- [Definitions](#definitions) - [Definitions](#definitions)
@@ -25,6 +26,13 @@
- [Display messages sent by delegates for delegator](#display-messages-sent-by-delegates-for-delegator) - [Display messages sent by delegates for delegator](#display-messages-sent-by-delegates-for-delegator)
- [User attribute `replace <Tag> <UserReplacement>` processing](Tag-Replace) - [User attribute `replace <Tag> <UserReplacement>` processing](Tag-Replace)
## Notes
Restrict email messages to authorized addresses or domains only
* https://support.google.com/a/answer/2640542
Block emails between specific user groups
* https://support.google.com/a/answer/9175444
## API documentation ## API documentation
* https://developers.google.com/gmail/api/v1/reference/users/messages * https://developers.google.com/gmail/api/v1/reference/users/messages
* https://developers.google.com/gmail/api/v1/reference/users/threads * https://developers.google.com/gmail/api/v1/reference/users/threads

View File

@@ -338,6 +338,10 @@ relation manager manageremail@domain.com
externalid organization "Employee ID" externalid organization "Employee ID"
``` ```
`<UserMultiAttribute>.location.buildingid <String>` allows non-validated building IDs
by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X' sets the building ID to `Building X`.
## Passwords ## Passwords
To set a user's password, you specify a `<Password>` string and a hash method that specifies how to interpret the string To set a user's password, you specify a `<Password>` string and a hash method that specifies how to interpret the string
* `password random|uniquerandom` - A 25 character plain text string of ASCII uppercase/lowecase letters, digits and punctuation * `password random|uniquerandom` - A 25 character plain text string of ASCII uppercase/lowecase letters, digits and punctuation

View File

@@ -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.71.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.71.13 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64 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 Print the current version of Gam with details and time offset information
``` ```
gam version timeoffset gam version timeoffset
GAMADV-XTD3 6.71.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.71.13 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64 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 Print the current version of Gam with extended details and SSL information
``` ```
gam version extended gam version extended
GAMADV-XTD3 6.71.12 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource GAMADV-XTD3 6.71.13 - https://github.com/taers232c/GAMADV-XTD3 - pythonsource
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64 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 Path: /Users/Admin/bin/gamadv-xtd3
Version Check: Version Check:
Current: 5.35.08 Current: 5.35.08
Latest: 6.71.12 Latest: 6.71.13
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.71.12 6.71.13
``` ```
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.71.12 - https://github.com/taers232c/GAMADV-XTD3 GAM 6.71.13 - https://github.com/taers232c/GAMADV-XTD3
Ross Scroggs <ross.scroggs@gmail.com> Ross Scroggs <ross.scroggs@gmail.com>
Python 3.12.2 64-bit final Python 3.12.2 64-bit final
MacOS Sonoma 14.2.1 x86_64 MacOS Sonoma 14.2.1 x86_64

View File

@@ -2,6 +2,11 @@
Merged GAM-Team version Merged GAM-Team version
6.71.23
Updated `<UserMultiAttribute>.location.buildingid <String>` to allow non-validated building IDs
by specifying `nv:` at the beginning of `<String>`; e.g., `nv:Building X' sets the building ID to `Building X`.
6.71.12 6.71.12
Added option `showmimetype category <MimeTypeNameList>` to `gam <UserTypeEntity> print|show filecounts|filelist|filetree` Added option `showmimetype category <MimeTypeNameList>` to `gam <UserTypeEntity> print|show filecounts|filelist|filetree`

View File

@@ -34822,13 +34822,15 @@ def _makeBuildingIdNameMap(cd=None):
GM.Globals[GM.MAP_BUILDING_ID_TO_NAME][building['buildingId']] = building['buildingName'] GM.Globals[GM.MAP_BUILDING_ID_TO_NAME][building['buildingId']] = building['buildingName']
GM.Globals[GM.MAP_BUILDING_NAME_TO_ID][building['buildingName']] = building['buildingId'] GM.Globals[GM.MAP_BUILDING_NAME_TO_ID][building['buildingName']] = building['buildingId']
def _getBuildingByNameOrId(cd, minLen=1): def _getBuildingByNameOrId(cd, minLen=1, allowNV=False):
which_building = getString(Cmd.OB_BUILDING_ID, minLen=minLen) which_building = getString(Cmd.OB_BUILDING_ID, minLen=minLen)
if not which_building or (minLen == 0 and which_building in {'id:', 'uid:'}): if not which_building or (minLen == 0 and which_building in {'id:', 'uid:'}):
return '' return ''
cg = UID_PATTERN.match(which_building) cg = UID_PATTERN.match(which_building)
if cg: if cg:
return cg.group(1) return cg.group(1)
if allowNV and which_building.startswith('nv:'):
return which_building[3:]
if GM.Globals[GM.MAKE_BUILDING_ID_NAME_MAP]: if GM.Globals[GM.MAKE_BUILDING_ID_NAME_MAP]:
_makeBuildingIdNameMap(cd) _makeBuildingIdNameMap(cd)
# Exact name match, return ID # Exact name match, return ID
@@ -34867,7 +34869,7 @@ def _getBuildingByNameOrId(cd, minLen=1):
def _getBuildingNameById(cd, buildingId): def _getBuildingNameById(cd, buildingId):
if GM.Globals[GM.MAKE_BUILDING_ID_NAME_MAP]: if GM.Globals[GM.MAKE_BUILDING_ID_NAME_MAP]:
_makeBuildingIdNameMap(cd) _makeBuildingIdNameMap(cd)
return GM.Globals[GM.MAP_BUILDING_ID_TO_NAME].get(buildingId, 'UNKNOWN') return GM.Globals[GM.MAP_BUILDING_ID_TO_NAME].get(buildingId, buildingId)
# gam update building <BuildIngID> <BuildingAttribute>* # gam update building <BuildIngID> <BuildingAttribute>*
def doUpdateBuilding(): def doUpdateBuilding():
@@ -41354,7 +41356,7 @@ def getUserAttributes(cd, updateCmd, noUid=False):
elif argument == 'area': elif argument == 'area':
entry['area'] = getString(Cmd.OB_STRING) entry['area'] = getString(Cmd.OB_STRING)
elif argument in {'building', 'buildingid'}: elif argument in {'building', 'buildingid'}:
entry['buildingId'] = _getBuildingByNameOrId(cd) entry['buildingId'] = _getBuildingByNameOrId(cd, allowNV=True)
elif argument in {'floor', 'floorname'}: elif argument in {'floor', 'floorname'}:
entry['floorName'] = getString(Cmd.OB_STRING, minLen=0) entry['floorName'] = getString(Cmd.OB_STRING, minLen=0)
elif argument in {'section', 'floorsection'}: elif argument in {'section', 'floorsection'}: