mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-18 05:01:37 +00:00
Compare commits
57 Commits
20240917.0
...
20240918.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
07bbf4d4ea | ||
|
|
7aafbbe58e | ||
|
|
c2058211fe | ||
|
|
08a6cbb270 | ||
|
|
c5da8963d4 | ||
|
|
89b854ea57 | ||
|
|
42fd8cd1e8 | ||
|
|
0e0f49c540 | ||
|
|
f0b1b62e79 | ||
|
|
7606a40a58 | ||
|
|
ac5098522b | ||
|
|
d84ff8d392 | ||
|
|
4a0687cfe9 | ||
|
|
19e386ed21 | ||
|
|
8165c72606 | ||
|
|
5267992e31 | ||
|
|
1949b3346c | ||
|
|
38375b1710 | ||
|
|
281e790260 | ||
|
|
2b8b2521d1 | ||
|
|
52601edb35 | ||
|
|
5475f281eb | ||
|
|
b1f8893783 | ||
|
|
640cb322d7 | ||
|
|
c4f15cbf3a | ||
|
|
bef392cf7a | ||
|
|
abb49ed336 | ||
|
|
fe5bc5569d | ||
|
|
18615f246d | ||
|
|
7958632046 | ||
|
|
3e8bff23c4 | ||
|
|
0221781a05 | ||
|
|
e6ced7fff6 | ||
|
|
484238ece2 | ||
|
|
ee32bb87f0 | ||
|
|
73803acb89 | ||
|
|
a40df40f9b | ||
|
|
a33b89788c | ||
|
|
54f815e503 | ||
|
|
e54d3d274a | ||
|
|
b7a20ceb4f | ||
|
|
bbc965d38f | ||
|
|
8935cf7041 | ||
|
|
4583f6d996 | ||
|
|
92282fb493 | ||
|
|
65ea328f2a | ||
|
|
2da4833a0d | ||
|
|
631ce68126 | ||
|
|
480aca680d | ||
|
|
6e3ab6700d | ||
|
|
61319fa08e | ||
|
|
673e9f88ad | ||
|
|
f2b8200a3b | ||
|
|
0383624c72 | ||
|
|
cb03b8d9d4 | ||
|
|
e7e821ca3d | ||
|
|
6b21fdbcc6 |
13
.github/actions/entitlements.plist
vendored
Normal file
13
.github/actions/entitlements.plist
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- These are required for binaries built by PyInstaller -->
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
118
.github/workflows/build.yml
vendored
118
.github/workflows/build.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
arch: aarch64
|
||||
openssl_archs: linux-aarch64
|
||||
staticx: yes
|
||||
- os: macos-12
|
||||
- os: macos-13
|
||||
jid: 6
|
||||
goal: build
|
||||
arch: x86_64
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
openssl_archs: VC-WIN64A
|
||||
- os: ubuntu-22.04
|
||||
goal: test
|
||||
python: "3.8"
|
||||
python: "3.13"
|
||||
jid: 10
|
||||
arch: x86_64
|
||||
- os: ubuntu-22.04
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
cache.tar.xz
|
||||
key: gam-${{ matrix.jid }}-20240916
|
||||
key: gam-${{ matrix.jid }}-20240918
|
||||
|
||||
- name: Untar Cache archive
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit == 'true'
|
||||
@@ -201,6 +201,14 @@ jobs:
|
||||
#brew install swig
|
||||
#brew install ncurses
|
||||
|
||||
- name: MacOS import developer certificates for signing
|
||||
if: runner.os == 'macOS'
|
||||
uses: apple-actions/import-codesign-certs@v3
|
||||
with:
|
||||
keychain: signing_temp
|
||||
p12-file-base64: ${{ secrets.CERTIFICATES_P12 }}
|
||||
p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }}
|
||||
|
||||
- name: Windows Configure VCode
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
if: runner.os == 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||
@@ -293,7 +301,8 @@ jobs:
|
||||
- name: Rename GNU link on Windows
|
||||
if: matrix.goal == 'build' && runner.os == 'Windows' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: mv /usr/bin/link /usr/bin/gnulink
|
||||
run: |
|
||||
mv -v /usr/bin/link /usr/bin/gnulink
|
||||
|
||||
- name: Make OpenSSL
|
||||
if: matrix.goal == 'build' && steps.cache-python-ssl.outputs.cache-hit != 'true'
|
||||
@@ -311,7 +320,7 @@ jobs:
|
||||
cd "${GITHUB_WORKSPACE}/src/openssl-${openssl_arch}"
|
||||
# install_sw saves us ages processing man pages :-)
|
||||
$MAKE install_sw
|
||||
mv "${OPENSSL_INSTALL_PATH}" "${GITHUB_WORKSPACE}/bin/ssl-${openssl_arch}"
|
||||
mv -v "${OPENSSL_INSTALL_PATH}" "${GITHUB_WORKSPACE}/bin/ssl-${openssl_arch}"
|
||||
done
|
||||
mkdir -vp "${OPENSSL_INSTALL_PATH}/lib"
|
||||
mkdir -vp "${OPENSSL_INSTALL_PATH}/bin"
|
||||
@@ -521,61 +530,60 @@ jobs:
|
||||
- name: Build GAM with PyInstaller
|
||||
if: matrix.goal != 'test'
|
||||
run: |
|
||||
if [[ "${staticx}" == "yes" ]]; then
|
||||
export distpath="./dist/gam"
|
||||
export gampath="${distpath}"
|
||||
else
|
||||
export distpath="./dist"
|
||||
export gampath="${distpath}/gam"
|
||||
fi
|
||||
mkdir -p -v "${gampath}"
|
||||
export distpath="./dist/gam"
|
||||
mkdir -p -v "${distpath}"
|
||||
if [[ "${RUNNER_OS}" == "macOS" ]]; then
|
||||
# brew OpenSSL gets picked up by PyInstaller breaking our self-compiled version
|
||||
# Tell our gam.spec to use our code sign certificate
|
||||
export codesign_identity="Jay Lee"
|
||||
# brew OpenSSL gets picked up by PyInstaller
|
||||
# breaking our self-compiled version
|
||||
brew uninstall --ignore-dependencies openssl
|
||||
export gampath=$($PYTHON -c "import os; print(os.path.realpath('$gampath'))")
|
||||
export PYINSTALLER_BUILD_ONEDIR=yes
|
||||
elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
# Work around issue where PyInstaller picks up python3.dll from other Python versions
|
||||
# https://github.com/pyinstaller/pyinstaller/issues/7102
|
||||
export PATH="$(dirname ${PYTHON}):/usr/bin"
|
||||
else
|
||||
export gampath=$(realpath "${gampath}")
|
||||
export PYINSTALLER_BUILD_ONEDIR=no
|
||||
elif [[ "${staticx}" != "yes" ]]; then
|
||||
export PYINSTALLER_BUILD_ONEDIR=yes
|
||||
fi
|
||||
export gam="${gampath}/gam"
|
||||
echo "gampath=${gampath}" >> $GITHUB_ENV
|
||||
# TEMP force everything back to one file.
|
||||
export PYINSTALLER_BUILD_ONEFILE="yes"
|
||||
export distpath="./dist/gam"
|
||||
export gampath="${distpath}"
|
||||
"${PYTHON}" -m PyInstaller --clean --noconfirm --distpath="${distpath}" gam.spec
|
||||
echo "WARNINGS FROM build/gam/warn-gam.txt"
|
||||
cat build/gam/warn-gam.txt
|
||||
echo "Analysis FROM build/gam/Analysis-00.toc"
|
||||
cat build/gam/Analysis-00.toc
|
||||
echo "EXE data FROM build/gam/EXE-00.toc"
|
||||
cat build/gam/EXE-00.toc
|
||||
if [ -x "$(command -v realpath)" ]; then
|
||||
realpath=realpath
|
||||
if [[ "$PYINSTALLER_BUILD_ONEDIR" == "yes" ]]; then
|
||||
mv -v "${distpath}/gam" "${distpath}/gam7"
|
||||
export gampath="${distpath}/gam7"
|
||||
else
|
||||
brew install coreutils
|
||||
realpath=grealpath
|
||||
mv -v "$distpath" "${distpath}7"
|
||||
export gampath="${distpath}7"
|
||||
fi
|
||||
export gam=$(realpath "$gam")
|
||||
export gampath=$(realpath "$gampath")
|
||||
echo "gampath ${gampath} results:"
|
||||
ls -alRF "$gampath"
|
||||
#echo "WARNINGS FROM build/gam/warn-gam.txt"
|
||||
#cat build/gam/warn-gam.txt
|
||||
#echo "Analysis FROM build/gam/Analysis-00.toc"
|
||||
#cat build/gam/Analysis-00.toc
|
||||
#echo "EXE data FROM build/gam/EXE-00.toc"
|
||||
#cat build/gam/EXE-00.toc
|
||||
export gam="${gampath}/gam"
|
||||
if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
export gam=$(cygpath -w "$gam")
|
||||
echo "GAM on Windows at ${gam}"
|
||||
else
|
||||
export gam=$(realpath "$gam")
|
||||
fi
|
||||
echo "gampath=${gampath}" >> $GITHUB_ENV
|
||||
echo "gam=${gam}" >> $GITHUB_ENV
|
||||
echo -e "GAM: ${gam}\nGAMPATH: ${gampath}"
|
||||
|
||||
- name: Copy extra package files
|
||||
if: matrix.goal == 'build'
|
||||
run: |
|
||||
cp -v cacerts.pem $gampath
|
||||
cp -v LICENSE $gampath
|
||||
cp -v GamCommands.txt $gampath
|
||||
cp -v GamUpdate.txt $gampath
|
||||
cp -v cacerts.pem "$gampath"
|
||||
cp -v LICENSE "$gampath"
|
||||
cp -v GamCommands.txt "$gampath"
|
||||
cp -v GamUpdate.txt "$gampath"
|
||||
if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
cp -v gam-setup.bat $gampath
|
||||
cp -v gam-setup.bat "$gampath"
|
||||
fi
|
||||
|
||||
- name: Install StaticX
|
||||
@@ -596,9 +604,21 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
echo "ldlib=${ldlib}"
|
||||
$PYTHON -m staticx -l "${ldlib}" "${gam}" "${gam}-staticx"
|
||||
rm -v "${gam}"
|
||||
mv -v "${gam}-staticx" "${gam}"
|
||||
$PYTHON -m staticx -l "${ldlib}" "$gam" "${gam}-staticx"
|
||||
rm -v "$gam"
|
||||
mv -v "${gam}-staticx" "$gam"
|
||||
|
||||
- name: MacOS send GAM binary for Apple notarization
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
ASP_NOTARIZE: ${{ secrets.ASP_NOTARIZE }}
|
||||
run: |
|
||||
# Apple wants some kind of "package" submitted so just add gam to a .zip
|
||||
# name it something we can track and link in Apple's notarize process
|
||||
zipfilename="./gam-${RUNNER_ARCH}-${GITHUB_RUN_ID}-${GITHUB_RUN_NUMBER}.zip"
|
||||
zip -r "$zipfilename" "$gampath"
|
||||
xcrun notarytool submit --apple-id "jay0lee@gmail.com" --password "$ASP_NOTARIZE" --team-id GZ85H2DRLM "$zipfilename"
|
||||
rm -v "$zipfilename"
|
||||
|
||||
- name: Basic Tests all jobs
|
||||
id: basictests
|
||||
@@ -629,14 +649,14 @@ jobs:
|
||||
GAM_ARCHIVE="gam-${GAMVERSION}-linux-$(arch)-${libver}.tar.xz"
|
||||
fi
|
||||
echo "GAM Archive ${GAM_ARCHIVE}"
|
||||
tar -C dist/ --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam
|
||||
tar -C "${gampath}/.." --create --verbose --exclude-from "${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" --file $GAM_ARCHIVE --xz gam7
|
||||
|
||||
- name: Windows package
|
||||
if: runner.os == 'Windows' && matrix.goal != 'test'
|
||||
run: |
|
||||
cd dist/
|
||||
cd "${gampath}/.."
|
||||
GAM_ARCHIVE="../gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.zip"
|
||||
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam "-xr@${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" -bb3
|
||||
/c/Program\ Files/7-Zip/7z.exe a -tzip $GAM_ARCHIVE gam7 "-xr@${GITHUB_WORKSPACE}/.github/actions/package_exclusions.txt" -bb3
|
||||
cd ..
|
||||
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/candle.exe -arch "${WIX_ARCH}" gam.wxs
|
||||
/c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/light.exe -ext /c/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.14/bin/WixUIExtension.dll gam.wixobj -o "gam-${GAMVERSION}-windows-${GAM_ARCHIVE_ARCH}.msi" || true;
|
||||
@@ -715,7 +735,8 @@ jobs:
|
||||
done
|
||||
driveid=$($gam user $gam_user add shareddrive "${newbase}" returnidonly)
|
||||
echo "Created shared drive ${driveid}"
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random ou "${newou}" recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB-
|
||||
# 9/17/24 - temp create in root due to Google API issues creating users in new OUs
|
||||
$gam create user $newuser firstname GHA lastname $JID displayname "Github Actions ${JID}" password random recoveryphone 12125121110 recoveryemail jay0lee@gmail.com gha.jid $JID languages en+,en-GB- # ou "${newou}"
|
||||
$gam user $newuser update photo https://dummyimage.com/400x600/000/fff
|
||||
$gam user $newuser get photo
|
||||
$gam user $newuser delete photo
|
||||
@@ -734,7 +755,8 @@ jobs:
|
||||
$gam update group $newgroup add owner $gam_user
|
||||
$gam update group $newgroup add member $newuser
|
||||
$gam config enable_dasa false save
|
||||
$gam create admin $newuser _GROUPS_EDITOR_ROLE CUSTOMER # condition nonsecuritygroup
|
||||
# 9/17/24 temp disable due to Google API sluggishness to see new users for admin commands
|
||||
# $gam create admin $newuser _GROUPS_EDITOR_ROLE CUSTOMER # condition nonsecuritygroup
|
||||
$gam create admin $newgroup _HELP_DESK_ADMIN_ROLE org_unit "${newou}"
|
||||
$gam config csv_output_row_filter "assignedToUser:regex:${newuser}" print admins | $gam csv - gam delete admin "~roleAssignmentId"
|
||||
$gam config csv_output_row_filter "assignedToGroup:regex:${newgroup}" print admins | $gam csv - gam delete admin "~roleAssignmentId"
|
||||
@@ -858,7 +880,7 @@ jobs:
|
||||
echo "printer model count:"
|
||||
$gam print printermodels | wc -l
|
||||
$gam print printers
|
||||
printerid=$($gam create printer displayname "${newbase}" uri ipp://localhost:631 driverless description "made by $(gam_user)" ou "${newou}" nodetails | awk '{print substr($2, 1, length($2)-1)}')
|
||||
printerid=$($gam create printer displayname "${newbase}" uri ipp://localhost:631 driverless description "made by ${gam_user}" ou "${newou}" nodetails | awk '{print substr($2, 1, length($2)-1)}')
|
||||
$gam info printer "$printerid"
|
||||
$gam delete printer "$printerid"
|
||||
$gam delete ou "${newou}"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GAM is a command line tool for Google Workspace admins to manage domain and user settings quickly and easily.
|
||||
|
||||

|
||||
[](https://github.com/GAM-team/GAM/actions/workflows/build.yml)
|
||||
|
||||
# Quick Start
|
||||
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
7.00.03
|
||||
|
||||
MacOS builds now use PyInstaller's "one directory" method which produces a smaller gam executable and a
|
||||
lib/ sub-directory with supporting libraries. one directory builds are an ORDER OF MAGNITUDE FASTER to start
|
||||
where 7.00.02 MacOS builds usually took ~7 seconds to run "gam version", 7.00.03 runs the command in less than
|
||||
0.5 seconds.
|
||||
|
||||
MacOS builds are now signed by Jay's Apple Developer ID and notarized (scanned for malware) by Apple. This
|
||||
should resolve MacOS security warnings that need to be overridden when running GAM.
|
||||
|
||||
Updated `gam delete ou` and `gam print admins` to handle the following error:
|
||||
```
|
||||
ERROR: 503: serviceNotAvailable - The service is currently unavailable.
|
||||
```
|
||||
|
||||
7.00.02
|
||||
|
||||
Added option `showlastmodification` to `gam <UserTypeEntity> print|show filecounts` that adds
|
||||
|
||||
@@ -21,7 +21,7 @@ EOF
|
||||
}
|
||||
|
||||
target_dir="$HOME/bin"
|
||||
target_gam="gam/gam"
|
||||
target_gam="gam7/gam"
|
||||
gamarch=$(uname -m)
|
||||
gamos=$(uname -s)
|
||||
osversion=""
|
||||
|
||||
82
src/gam.spec
82
src/gam.spec
@@ -21,7 +21,7 @@ hiddenimports = [
|
||||
'gam.gamlib.yubikey',
|
||||
]
|
||||
|
||||
print(f"datas before analysis:\n{datas}")
|
||||
runtime_hooks = []
|
||||
a = Analysis(
|
||||
['gam/__main__.py'],
|
||||
pathex=[],
|
||||
@@ -30,30 +30,35 @@ a = Analysis(
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
runtime_hooks=runtime_hooks,
|
||||
excludes=[],
|
||||
win_no_prefer_redirects=False,
|
||||
win_private_assemblies=False,
|
||||
cipher=None,
|
||||
noarchive=False,
|
||||
)
|
||||
print(f"datas from analysis:\n{a.datas}")
|
||||
#print(f"datas from analysis:\n{a.datas}")
|
||||
for d in a.datas:
|
||||
if 'pyconfig' in d[0]:
|
||||
a.datas.remove(d)
|
||||
break
|
||||
print(f"datas after pyconfig cleanup:\n{a.datas}")
|
||||
#print(f"datas after pyconfig cleanup:\n{a.datas}")
|
||||
pyz = PYZ(a.pure,
|
||||
a.zipped_data,
|
||||
cipher=None)
|
||||
# requires Python 3.10+ but no one should be compiling
|
||||
# GAM with older versions anyway
|
||||
target_arch = None
|
||||
codesign_identity = None
|
||||
entitlements_file = None
|
||||
match platform:
|
||||
case "darwin":
|
||||
if getenv('arch') == 'universal2':
|
||||
target_arch = "universal2"
|
||||
else:
|
||||
target_arch = None
|
||||
|
||||
codesign_identity = getenv('codesign_identity')
|
||||
if codesign_identity:
|
||||
entitlements_file = '../.github/actions/entitlements.plist'
|
||||
strip = True
|
||||
case "win32":
|
||||
target_arch = None
|
||||
@@ -68,9 +73,38 @@ upx = False
|
||||
console = True
|
||||
disable_windowed_traceback = False
|
||||
argv_emulation = False
|
||||
codesign_identity = None
|
||||
entitlements_file = None
|
||||
if not getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
if getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
# Build one directory
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name=name,
|
||||
debug=debug,
|
||||
bootloader_ignore_signals=bootloader_ignore_signals,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
console=console,
|
||||
# put most everyting under a lib/ subfolder
|
||||
contents_directory='lib',
|
||||
disable_windowed_traceback=disable_windowed_traceback,
|
||||
argv_emulation=argv_emulation,
|
||||
target_arch=target_arch,
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
upx_exclude=[],
|
||||
name=name,
|
||||
)
|
||||
else:
|
||||
# Build one file
|
||||
exe = EXE(
|
||||
pyz,
|
||||
@@ -91,32 +125,4 @@ if not getenv('PYINSTALLER_BUILD_ONEDIR') == 'yes':
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
)
|
||||
else:
|
||||
# Build one folder
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name=name,
|
||||
debug=debug,
|
||||
bootloader_ignore_signals=bootloader_ignore_signals,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
console=console,
|
||||
disable_windowed_traceback=disable_windowed_traceback,
|
||||
argv_emulation=argv_emulation,
|
||||
target_arch=target_arch,
|
||||
codesign_identity=codesign_identity,
|
||||
entitlements_file=entitlements_file,
|
||||
)
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.zipfiles,
|
||||
a.datas,
|
||||
strip=strip,
|
||||
upx=upx,
|
||||
upx_exclude=[],
|
||||
name=name,
|
||||
)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<ComponentGroup
|
||||
Id="ProductComponents"
|
||||
Directory="INSTALLFOLDER"
|
||||
Source="dist/gam">
|
||||
Source="dist/gam7">
|
||||
<Component Id="gam_exe" Guid="d046ea24-c9f8-40ca-84db-70b0119933ff">
|
||||
<File Name="gam.exe" KeyPath="yes" />
|
||||
<Environment Id="PATH" Name="PATH" Value="[INSTALLFOLDER]" Permanent="yes" Part="last" Action="set" System="yes" />
|
||||
|
||||
@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
|
||||
"""
|
||||
|
||||
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
|
||||
__version__ = '7.00.02'
|
||||
__version__ = '7.00.03'
|
||||
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||
|
||||
#pylint: disable=wrong-import-position
|
||||
@@ -9231,7 +9231,7 @@ def doCheckConnection():
|
||||
api_hosts.append(host)
|
||||
hosts.extend(sorted(api_hosts))
|
||||
host_count = len(hosts)
|
||||
httpObj = getHttpObj(timeout=10)
|
||||
httpObj = getHttpObj(timeout=30)
|
||||
httpObj.follow_redirects = False
|
||||
headers = {'user-agent': GAM_USER_AGENT}
|
||||
okay = createGreenText('OK')
|
||||
@@ -16623,13 +16623,15 @@ def doPrintShowAdmins():
|
||||
try:
|
||||
admins = callGAPIpages(cd.roleAssignments(), 'list', 'items',
|
||||
pageMessage=getPageMessage(),
|
||||
throwReasons=[GAPI.INVALID, GAPI.USER_NOT_FOUND, GAPI.BAD_REQUEST,
|
||||
GAPI.CUSTOMER_NOT_FOUND, GAPI.FORBIDDEN],
|
||||
throwReasons=[GAPI.INVALID, GAPI.USER_NOT_FOUND,
|
||||
GAPI.FORBIDDEN, GAPI.SERVICE_NOT_AVAILABLE,
|
||||
GAPI.BAD_REQUEST, GAPI.CUSTOMER_NOT_FOUND],
|
||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||
customer=GC.Values[GC.CUSTOMER_ID], fields=fields, **kwargs)
|
||||
except (GAPI.invalid, GAPI.userNotFound):
|
||||
entityUnknownWarning(Ent.ADMINISTRATOR, userKey)
|
||||
return
|
||||
except GAPI.forbidden as e:
|
||||
except (GAPI.forbidden, GAPI.serviceNotAvailable) as e:
|
||||
entityActionFailedExit([Ent.ADMINISTRATOR, userKey, Ent.ADMIN_ROLE, roleId], str(e))
|
||||
except (GAPI.badRequest, GAPI.customerNotFound):
|
||||
accessErrorExit(cd)
|
||||
@@ -17334,14 +17336,17 @@ def _doDeleteOrgs(entityList):
|
||||
try:
|
||||
orgUnitPath = makeOrgUnitPathAbsolute(orgUnitPath)
|
||||
callGAPI(cd.orgunits(), 'delete',
|
||||
throwReasons=[GAPI.CONDITION_NOT_MET, GAPI.INVALID_ORGUNIT, GAPI.ORGUNIT_NOT_FOUND, GAPI.BACKEND_ERROR, GAPI.BAD_REQUEST, GAPI.INVALID_CUSTOMER_ID, GAPI.LOGIN_REQUIRED],
|
||||
throwReasons=[GAPI.CONDITION_NOT_MET, GAPI.INVALID_ORGUNIT, GAPI.ORGUNIT_NOT_FOUND, GAPI.BACKEND_ERROR,
|
||||
GAPI.INVALID_CUSTOMER_ID, GAPI.SERVICE_NOT_AVAILABLE,
|
||||
GAPI.BAD_REQUEST, GAPI.LOGIN_REQUIRED],
|
||||
retryReasons=GAPI.SERVICE_NOT_AVAILABLE_RETRY_REASONS,
|
||||
customerId=GC.Values[GC.CUSTOMER_ID], orgUnitPath=encodeOrgUnitPath(makeOrgUnitPathRelative(orgUnitPath)))
|
||||
entityActionPerformed([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], i, count)
|
||||
except GAPI.conditionNotMet:
|
||||
entityActionFailedWarning([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], Msg.HAS_CHILD_ORGS.format(Ent.Plural(Ent.ORGANIZATIONAL_UNIT)), i, count)
|
||||
except (GAPI.invalidOrgunit, GAPI.orgunitNotFound, GAPI.backendError):
|
||||
entityActionFailedWarning([Ent.ORGANIZATIONAL_UNIT, orgUnitPath], Msg.DOES_NOT_EXIST, i, count)
|
||||
except GAPI.invalidCustomerId as e:
|
||||
except (GAPI.invalidCustomerId, GAPI.serviceNotAvailable) as e:
|
||||
### Check for my_customer
|
||||
entityActionFailedWarning([Ent.ORGANIZATIONAL_UNIT, orgUnitPath, Ent.CUSTOMER_ID, GC.Values[GC.CUSTOMER_ID]], str(e), i, count)
|
||||
except (GAPI.badRequest, GAPI.loginRequired):
|
||||
|
||||
@@ -13,10 +13,10 @@ keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive,
|
||||
classifiers =
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3 :: Only
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
License :: OSI Approved :: Apache License
|
||||
|
||||
[options]
|
||||
|
||||
Reference in New Issue
Block a user