mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-07 21:23:34 +00:00
Merge branch 'main' of https://github.com/GAM-team/GAM
This commit is contained in:
12
.github/workflows/build.yml
vendored
12
.github/workflows/build.yml
vendored
@ -49,22 +49,22 @@ jobs:
|
||||
goal: build
|
||||
arch: Win32
|
||||
openssl_archs: VC-WIN32
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.7"
|
||||
jid: 7
|
||||
arch: x86_64
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.8"
|
||||
jid: 8
|
||||
arch: x86_64
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.9"
|
||||
jid: 9
|
||||
arch: x86_64
|
||||
- os: ubuntu-20.04
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.11-dev"
|
||||
jid: 10
|
||||
@ -82,7 +82,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
bin
|
||||
key: gam-${{ matrix.jid }}-20220525
|
||||
key: gam-${{ matrix.jid }}-20220621
|
||||
|
||||
- name: Use pre-compiled Python for testing
|
||||
if: matrix.python != ''
|
||||
@ -628,7 +628,7 @@ jobs:
|
||||
$gam print vaultmatters matterstate open
|
||||
$gam print vaultholds matter $matterid
|
||||
$gam print vaultcount matter $matterid corpus mail everyone todrive
|
||||
$gam create vaultexport matter $matterid name "GHA export $newbase" corpus mail accounts $newuser use_new_export true
|
||||
$gam create vaultexport matter $matterid name "GHA export $newbase" corpus mail accounts $newuser use_new_export false
|
||||
$gam print exports matter $matterid | $gam csv - gam info export $matterid id:~~id~~
|
||||
$gam csv sample.csv gam user ~email add calendar id:$newresource
|
||||
$gam delete resource $newresource
|
||||
|
@ -682,12 +682,19 @@ Specify a collection of Users by directly specifying them or by specifying items
|
||||
## Item attributes
|
||||
|
||||
<BuildingAttribute> ::=
|
||||
(address|addresslines <String>)|
|
||||
(city|locality <String>)|
|
||||
(country|regioncode <String>)|
|
||||
(description <String>)|
|
||||
(floors <FloorNameList>)|
|
||||
(id <String>)|
|
||||
(language|languageCode <Language>)|
|
||||
(latitude <Float>)|
|
||||
(longitude <Float>)|
|
||||
(name <String>)
|
||||
(state|administrativearea <String>)|
|
||||
(sublocality <String>)|
|
||||
(zipcode|postalcode <String>)
|
||||
|
||||
<CalendarAttribute> ::=
|
||||
(selected <Boolean>)|(hidden <Boolean>)|(summary <String>)|(colorindex|colorid <CalendarColorIndex>)|(backgroundcolor <ColorValue>)|(foregroundcolor <ColorValue>)|
|
||||
@ -1839,7 +1846,7 @@ gam <UserTypeEntity> update teamdrive <TeamDriveID>|(name <TeamDriveName>) [asad
|
||||
[(theme|themeid <String>) | ([customtheme <DriveFileID> <Float> <Float> <Float>] [color <ColorValue>])]
|
||||
(<TeamDriveRestrictionsSubfieldName> <Boolean>)*
|
||||
[hidden <Boolean>]
|
||||
gam <UserTypeEntity> delete teamdrive <TeamDriveID>|(name <TeamDriveName>) [allowitemdeletion|nukefromorbit]
|
||||
gam <UserTypeEntity> delete teamdrive <TeamDriveID>|(name <TeamDriveName>) [asadmin] [allowitemdeletion|nukefromorbit]
|
||||
gam <UserTypeEntity> show teamdriveinfo <TeamDriveID>|(name <TeamDriveName>) [asadmin]
|
||||
gam <UserTypeEntity> show teamdrives [query <QueryTeamDrive>] [asadmin]
|
||||
gam <UserTypeEntity> print teamdrives [query <QueryTeamDrive>] [todrive] [asadmin]
|
||||
|
@ -8243,6 +8243,9 @@ def doDeleteSharedDrive(users):
|
||||
allowItemDeletion = True
|
||||
useDomainAdminAccess = True
|
||||
i += 1
|
||||
elif myarg == 'asadmin':
|
||||
useDomainAdminAccess = True
|
||||
i += 1
|
||||
else:
|
||||
controlflow.invalid_argument_exit(
|
||||
myarg, 'gam delete shareddrive')
|
||||
|
@ -373,17 +373,20 @@ def makeOrgUnitPathRelative(path):
|
||||
|
||||
|
||||
def encodeOrgUnitPath(path):
|
||||
if path.find('+') == -1 and path.find('%') == -1:
|
||||
return path
|
||||
encpath = ''
|
||||
for c in path:
|
||||
if c == '+':
|
||||
encpath += '%2B'
|
||||
elif c == '%':
|
||||
encpath += '%25'
|
||||
else:
|
||||
encpath += c
|
||||
return encpath
|
||||
# 6.22 - This method no longer works.
|
||||
# % no longer needs encoding and + is handled incorrectly in API with or without encoding
|
||||
return path
|
||||
# if path.find('+') == -1 and path.find('%') == -1:
|
||||
# return path
|
||||
# encpath = ''
|
||||
# for c in path:
|
||||
# if c == '+':
|
||||
# encpath += '%2B'
|
||||
# elif c == '%':
|
||||
# encpath += '%25'
|
||||
# else:
|
||||
# encpath += c
|
||||
# return encpath
|
||||
|
||||
|
||||
def getOrgUnitItem(orgUnit, pathOnly=False, absolutePath=True):
|
||||
|
@ -227,6 +227,22 @@ def printFeatures():
|
||||
display.write_csv_file(csvRows, titles, 'Features', to_drive)
|
||||
|
||||
|
||||
BUILDING_ADDRESS_FIELD_MAP = {
|
||||
'address': 'addressLines',
|
||||
'addresslines': 'addressLines',
|
||||
'administrativearea': 'administrativeArea',
|
||||
'city': 'locality',
|
||||
'country': 'regionCode',
|
||||
'language': 'languageCode',
|
||||
'languagecode': 'languageCode',
|
||||
'locality': 'locality',
|
||||
'postalcode': 'postalCode',
|
||||
'regioncode': 'regionCode',
|
||||
'state': 'administrativeArea',
|
||||
'sublocality': 'sublocality',
|
||||
'zipcode': 'postalCode',
|
||||
}
|
||||
|
||||
def _getBuildingAttributes(args, body={}):
|
||||
i = 0
|
||||
while i < len(args):
|
||||
@ -253,6 +269,16 @@ def _getBuildingAttributes(args, body={}):
|
||||
elif myarg == 'floors':
|
||||
body['floorNames'] = args[i + 1].split(',')
|
||||
i += 2
|
||||
elif myarg in BUILDING_ADDRESS_FIELD_MAP:
|
||||
myarg = BUILDING_ADDRESS_FIELD_MAP[myarg]
|
||||
body.setdefault('address', {})
|
||||
if myarg == 'addressLines':
|
||||
body['address'][myarg] = args[i + 1].split('\n')
|
||||
elif myarg == 'languageCode':
|
||||
body['address'][myarg] = LANGUAGE_CODES_MAP.get(args[i + 1].lower(), args[i + 1])
|
||||
else:
|
||||
body['address'][myarg] = args[i + 1]
|
||||
i += 2
|
||||
else:
|
||||
controlflow.invalid_argument_exit(myarg,
|
||||
'gam create|update building')
|
||||
|
@ -27,7 +27,7 @@ def create():
|
||||
body['scopeType'])
|
||||
if body['scopeType'] == 'ORG_UNIT':
|
||||
orgUnit, orgUnitId = gapi_directory_orgunits.getOrgUnitId(
|
||||
sys.argv[6], cd)
|
||||
sys.argv[i], cd)
|
||||
body['orgUnitId'] = orgUnitId[3:]
|
||||
scope = f'ORG_UNIT {orgUnit}'
|
||||
i = 7
|
||||
|
Reference in New Issue
Block a user