mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-16 20:21:37 +00:00
Compare commits
6 Commits
20241118.2
...
20241121.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1870b25b0b | ||
|
|
8f7eeae4a7 | ||
|
|
f2e16c52cb | ||
|
|
759f0cfb69 | ||
|
|
e1941cb220 | ||
|
|
1af1f10974 |
@@ -1,3 +1,8 @@
|
||||
7.00.40
|
||||
|
||||
Updated `gam <UserTypeEntity> update serviceaccount` to properly set the readonly scope
|
||||
for `[R] 35) Meet API (supports readonly)` as it is a special case.
|
||||
|
||||
7.00.39
|
||||
|
||||
Supported MacOS versions are now in the download filename.
|
||||
|
||||
11
src/gam.exe.manifest
Normal file
11
src/gam.exe.manifest
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 8.1 / Server 2012 R2 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||
<!-- Windows 10+ / Server 2016+ -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
</application>
|
||||
</compatibility>
|
||||
</assembly>
|
||||
24
src/gam.spec
24
src/gam.spec
@@ -1,12 +1,27 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
from os import getenv
|
||||
from re import search
|
||||
import re
|
||||
from sys import platform
|
||||
|
||||
from PyInstaller.utils.hooks import copy_metadata
|
||||
|
||||
from gam.gamlib.glverlibs import GAM_VER_LIBS
|
||||
|
||||
|
||||
with open("gam/__init__.py") as f:
|
||||
version_file = f.read()
|
||||
version = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M).group(1)
|
||||
version_tuple = "(" + version.split("-")[0].replace(".", ", ") + ", 0)"
|
||||
|
||||
with open("version_info.txt.in") as f:
|
||||
version_info = f.read()
|
||||
version_info = version_info.replace("{VERSION}", version).replace(
|
||||
"{VERSION_TUPLE}", version_tuple
|
||||
)
|
||||
with open("version_info.txt", "w") as f:
|
||||
f.write(version_info)
|
||||
print(version_info)
|
||||
|
||||
datas = []
|
||||
for pkg in GAM_VER_LIBS:
|
||||
datas += copy_metadata(pkg, recursive=True)
|
||||
@@ -50,6 +65,8 @@ pyz = PYZ(a.pure,
|
||||
target_arch = None
|
||||
codesign_identity = None
|
||||
entitlements_file = None
|
||||
manifest = None
|
||||
version = 'version_info.txt'
|
||||
match platform:
|
||||
case "darwin":
|
||||
if getenv('arch') == 'universal2':
|
||||
@@ -62,6 +79,7 @@ match platform:
|
||||
case "win32":
|
||||
target_arch = None
|
||||
strip = False
|
||||
manifest = 'gam.exe.manifest'
|
||||
case _:
|
||||
target_arch = None
|
||||
strip = True
|
||||
@@ -83,6 +101,7 @@ if getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
debug=debug,
|
||||
bootloader_ignore_signals=bootloader_ignore_signals,
|
||||
strip=strip,
|
||||
manifest=manifest,
|
||||
upx=upx,
|
||||
console=console,
|
||||
# put most everyting under a lib/ subfolder
|
||||
@@ -92,6 +111,7 @@ if getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
target_arch=target_arch,
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
version=version,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
@@ -115,6 +135,7 @@ else:
|
||||
name=name,
|
||||
debug=debug,
|
||||
bootloader_ignore_signals=bootloader_ignore_signals,
|
||||
manifest=manifest,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
console=console,
|
||||
@@ -123,5 +144,6 @@ else:
|
||||
target_arch=target_arch,
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
version=version,
|
||||
)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.00.39'
|
||||
__version__ = '7.00.40'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -10550,7 +10550,7 @@ Continue to authorization by entering a 'c'
|
||||
selectedScopes[i] = '*'
|
||||
break
|
||||
if 'readonly' in a_scope['subscopes']:
|
||||
if scope == possibleScope+'.readonly':
|
||||
if (scope == possibleScope+'.readonly') or (scope == a_scope.get('roscope')):
|
||||
selectedScopes[i] = 'R'
|
||||
break
|
||||
i += 1
|
||||
@@ -12140,8 +12140,12 @@ def checkServiceAccount(users):
|
||||
checkScopesSet.add(scope['scope'])
|
||||
elif selectedScopes[i] == 'R':
|
||||
saScopes.setdefault(scope['api'], [])
|
||||
saScopes[scope['api']].append(f'{scope["scope"]}.readonly')
|
||||
checkScopesSet.add(f'{scope["scope"]}.readonly')
|
||||
if 'roscope' not in scope:
|
||||
saScopes[scope['api']].append(f'{scope["scope"]}.readonly')
|
||||
checkScopesSet.add(f'{scope["scope"]}.readonly')
|
||||
else:
|
||||
saScopes[scope['api']].append(scope['roscope'])
|
||||
checkScopesSet.add(scope['roscope'])
|
||||
i += 1
|
||||
if API.DRIVEACTIVITY in saScopes and API.DRIVE3 in saScopes:
|
||||
saScopes[API.DRIVEACTIVITY].append(API.DRIVE_SCOPE)
|
||||
|
||||
@@ -38,8 +38,8 @@ class GamAction():
|
||||
CLAIM_OWNERSHIP = 'clow'
|
||||
CLEAR = 'clea'
|
||||
CLOSE = 'clos'
|
||||
COLLECT = 'collect'
|
||||
COMMENT = 'comment'
|
||||
COLLECT = 'coll'
|
||||
COMMENT = 'comm'
|
||||
COPY = 'copy'
|
||||
COPY_MERGE = 'copm'
|
||||
CREATE = 'crea'
|
||||
|
||||
@@ -666,7 +666,8 @@ _SVCACCT_SCOPES = [
|
||||
{'name': 'Meet API',
|
||||
'api': MEET,
|
||||
'subscopes': READONLY,
|
||||
'scope': 'https://www.googleapis.com/auth/meetings.space.created'},
|
||||
'scope': 'https://www.googleapis.com/auth/meetings.space.created',
|
||||
'roscope': 'https://www.googleapis.com/auth/meetings.space.readonly'},
|
||||
{'name': 'OAuth2 API',
|
||||
'api': OAUTH2,
|
||||
'subscopes': [],
|
||||
|
||||
42
src/version_info.txt.in
Normal file
42
src/version_info.txt.in
Normal file
@@ -0,0 +1,42 @@
|
||||
# UTF-8
|
||||
#
|
||||
# For more details about fixed file info 'ffi' see:
|
||||
# http://msdn.microsoft.com/en-us/library/ms646997.aspx
|
||||
VSVersionInfo(
|
||||
ffi=FixedFileInfo(
|
||||
# filevers and prodvers should be always a tuple with four items: (1, 2, 3, 4)
|
||||
# Set not needed items to zero 0.
|
||||
filevers={VERSION_TUPLE},
|
||||
prodvers={VERSION_TUPLE},
|
||||
# Contains a bitmask that specifies the valid bits 'flags'r
|
||||
mask=0x3f,
|
||||
# Contains a bitmask that specifies the Boolean attributes of the file.
|
||||
flags=0x0,
|
||||
# The operating system for which this file was designed.
|
||||
# 0x4 - NT and there is no need to change it.
|
||||
OS=0x4,
|
||||
# The general type of file.
|
||||
# 0x1 - the file is an application.
|
||||
fileType=0x2,
|
||||
# The function of the file.
|
||||
# 0x0 - the function is not defined for this fileType
|
||||
subtype=0x0,
|
||||
# Creation date and time stamp.
|
||||
date=(0, 0)
|
||||
),
|
||||
kids=[
|
||||
StringFileInfo(
|
||||
[
|
||||
StringTable(
|
||||
'040904b0',
|
||||
[StringStruct('CompanyName', 'GAM-team'),
|
||||
StringStruct('FileDescription', 'CLI for Google Workspace admins'),
|
||||
StringStruct('FileVersion', '{VERSION}'),
|
||||
StringStruct('LegalCopyright', 'Copyright (c) 2024 GAM team'),
|
||||
StringStruct('OriginalFilename', 'gam.exe'),
|
||||
StringStruct('ProductName', 'GAM'),
|
||||
StringStruct('ProductVersion', '{VERSION}')])
|
||||
]),
|
||||
VarFileInfo([VarStruct('Translation', [1033, 1200])])
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user