mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-04 04:41:35 +00:00
Merge branch 'main' of https://github.com/jay0lee/GAM into main
This commit is contained in:
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -12,13 +12,13 @@ defaults:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_PYTHON_VERSION: "3.9.6"
|
BUILD_PYTHON_VERSION: "3.9.7"
|
||||||
MIN_PYTHON_VERSION: "3.9.6"
|
MIN_PYTHON_VERSION: "3.9.7"
|
||||||
BUILD_OPENSSL_VERSION: "1.1.1l"
|
BUILD_OPENSSL_VERSION: "1.1.1l"
|
||||||
MIN_OPENSSL_VERSION: "1.1.1k"
|
MIN_OPENSSL_VERSION: "1.1.1l"
|
||||||
PATCHELF_VERSION: "0.12"
|
PATCHELF_VERSION: "0.12"
|
||||||
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
# PYINSTALLER_VERSION can be full commit hash or version like v4.20
|
||||||
PYINSTALLER_VERSION: "bcb824c1ad2989855a5fc01d95e5fc693b2f0966"
|
PYINSTALLER_VERSION: "5a02f55c696f16b98f23a8b487f3daa8f644a8d2"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/python
|
~/python
|
||||||
~/ssl
|
~/ssl
|
||||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20210628
|
key: ${{ matrix.os }}-${{ matrix.jid }}-20210910
|
||||||
|
|
||||||
- name: Set env variables
|
- name: Set env variables
|
||||||
env:
|
env:
|
||||||
@@ -166,6 +166,7 @@ jobs:
|
|||||||
echo "pip=$pip" >> $GITHUB_ENV
|
echo "pip=$pip" >> $GITHUB_ENV
|
||||||
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
|
||||||
echo -e "Python: $python\nPip: $pip\nLD_LIB...: $LD_LIBRARY_PATH"
|
echo -e "Python: $python\nPip: $pip\nLD_LIB...: $LD_LIBRARY_PATH"
|
||||||
|
$pip install --upgrade pip
|
||||||
$pip install wheel
|
$pip install wheel
|
||||||
export url="https://codeload.github.com/pyinstaller/pyinstaller/tar.gz/${PYINSTALLER_VERSION}"
|
export url="https://codeload.github.com/pyinstaller/pyinstaller/tar.gz/${PYINSTALLER_VERSION}"
|
||||||
echo "Downloading ${url}"
|
echo "Downloading ${url}"
|
||||||
@@ -184,7 +185,8 @@ jobs:
|
|||||||
$python ./waf all $TARGETARCH
|
$python ./waf all $TARGETARCH
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
$python setup.py install
|
$pip install .
|
||||||
|
#$python setup.py install
|
||||||
#$pip install pyinstaller
|
#$pip install pyinstaller
|
||||||
|
|
||||||
- name: Install pip requirements
|
- name: Install pip requirements
|
||||||
|
|||||||
27
README.md
27
README.md
@@ -1,23 +1,46 @@
|
|||||||
GAM is a command line tool for Google Workspace (fka G Suite) Administrators to manage domain and user settings quickly and easily.
|
GAM is a command line tool for Google Workspace (fka G Suite) Administrators to manage domain and user settings quickly and easily.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
# Quick Start
|
# Quick Start
|
||||||
|
|
||||||
## Linux / MacOS
|
## Linux / MacOS
|
||||||
|
|
||||||
Open a terminal and run:
|
Open a terminal and run:
|
||||||
```
|
|
||||||
|
```sh
|
||||||
bash <(curl -s -S -L https://git.io/install-gam)
|
bash <(curl -s -S -L https://git.io/install-gam)
|
||||||
```
|
```
|
||||||
|
|
||||||
this will download GAM, install it and start setup.
|
this will download GAM, install it and start setup.
|
||||||
|
|
||||||
|
To install with `pip`, run
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pip install git+https://github.com/jay0lee/GAM.git#subdirectory=src
|
||||||
|
```
|
||||||
|
|
||||||
|
This will only download and install GAM. To start setup, simply invoke the `gam` CLI.
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
Download the MSI Installer from the [GitHub Releases] page. Install the MSI and you'll be prompted to setup GAM.
|
Download the MSI Installer from the [GitHub Releases] page. Install the MSI and you'll be prompted to setup GAM.
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
|
|
||||||
The GAM documentation is hosted in the [GitHub Wiki]
|
The GAM documentation is hosted in the [GitHub Wiki]
|
||||||
|
|
||||||
# Mailing List / Discussion group
|
# Mailing List / Discussion group
|
||||||
|
|
||||||
The GAM mailing list / discussion group is hosted on [Google Groups]. You can join the list and interact via email, or just post from the web itself.
|
The GAM mailing list / discussion group is hosted on [Google Groups]. You can join the list and interact via email, or just post from the web itself.
|
||||||
|
|
||||||
# Chat Room
|
# Chat Room
|
||||||
|
|
||||||
There is a public chat room hosted in Google Chat. [Instructions to join](https://git.io/gam-chat).
|
There is a public chat room hosted in Google Chat. [Instructions to join](https://git.io/gam-chat).
|
||||||
|
|
||||||
# Author
|
# Author
|
||||||
GAM is maintained by <a href="mailto:jay0lee@gmail.com">Jay Lee</a>. Please direct "how do I?" questions to [Google Groups].
|
|
||||||
|
GAM is maintained by [Jay Lee](mailto:jay0lee@gmail.com). Please direct "how do I?" questions to [Google Groups].
|
||||||
|
|
||||||
[GAM release]: https://git.io/gamreleases
|
[GAM release]: https://git.io/gamreleases
|
||||||
[GitHub Releases]: https://github.com/jay0lee/GAM/releases
|
[GitHub Releases]: https://github.com/jay0lee/GAM/releases
|
||||||
|
|||||||
@@ -720,6 +720,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
|
|||||||
(customfootertext <String>)|
|
(customfootertext <String>)|
|
||||||
(customreplyto <EmailAddress>)|
|
(customreplyto <EmailAddress>)|
|
||||||
(defaultmessagedenynotificationtext <String>)|
|
(defaultmessagedenynotificationtext <String>)|
|
||||||
|
(defaultsender default_self|group)|
|
||||||
(description <String>)|
|
(description <String>)|
|
||||||
(enablecollaborativeinbox|collaborative <Boolean>)|
|
(enablecollaborativeinbox|collaborative <Boolean>)|
|
||||||
(includeinglobaladdresslist|gal <Boolean>)|
|
(includeinglobaladdresslist|gal <Boolean>)|
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ def printshow_policies():
|
|||||||
for namespace in namespaces:
|
for namespace in namespaces:
|
||||||
spacing = ' '
|
spacing = ' '
|
||||||
body['policySchemaFilter'] = f'{namespace}.*'
|
body['policySchemaFilter'] = f'{namespace}.*'
|
||||||
|
body['pageToken'] = None
|
||||||
try:
|
try:
|
||||||
policies = gapi.get_all_pages(svc.customers().policies(), 'resolve',
|
policies = gapi.get_all_pages(svc.customers().policies(), 'resolve',
|
||||||
items='resolvedPolicies',
|
items='resolvedPolicies',
|
||||||
|
|||||||
@@ -266,6 +266,8 @@ GROUP_ATTRIBUTES_ARGUMENT_TO_PROPERTY_MAP = {
|
|||||||
'customReplyTo',
|
'customReplyTo',
|
||||||
'defaultmessagedenynotificationtext':
|
'defaultmessagedenynotificationtext':
|
||||||
'defaultMessageDenyNotificationText',
|
'defaultMessageDenyNotificationText',
|
||||||
|
'defaultsender':
|
||||||
|
'defaultSender',
|
||||||
'enablecollaborativeinbox':
|
'enablecollaborativeinbox':
|
||||||
'enableCollaborativeInbox',
|
'enableCollaborativeInbox',
|
||||||
'favoriterepliesontop':
|
'favoriterepliesontop':
|
||||||
@@ -979,6 +981,9 @@ def update():
|
|||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
f'Group: {group}, Will add {len(to_add)} and remove {len(to_remove)} {role}s.\n'
|
f'Group: {group}, Will add {len(to_add)} and remove {len(to_remove)} {role}s.\n'
|
||||||
)
|
)
|
||||||
|
for user in to_remove:
|
||||||
|
items.append(
|
||||||
|
['gam', 'update', 'group', group, 'remove', user])
|
||||||
for user in to_add:
|
for user in to_add:
|
||||||
item = ['gam', 'update', 'group', group, 'add']
|
item = ['gam', 'update', 'group', group, 'add']
|
||||||
if role:
|
if role:
|
||||||
@@ -987,9 +992,6 @@ def update():
|
|||||||
item.append(delivery)
|
item.append(delivery)
|
||||||
item.append(user)
|
item.append(user)
|
||||||
items.append(item)
|
items.append(item)
|
||||||
for user in to_remove:
|
|
||||||
items.append(
|
|
||||||
['gam', 'update', 'group', group, 'remove', user])
|
|
||||||
elif myarg in ['delete', 'remove']:
|
elif myarg in ['delete', 'remove']:
|
||||||
_, users_email, _ = _getRoleAndUsers()
|
_, users_email, _ = _getRoleAndUsers()
|
||||||
if not exists(cd, group):
|
if not exists(cd, group):
|
||||||
@@ -1219,7 +1221,7 @@ def getGroupAttrValue(myarg, value, gs_object, gs_body, function):
|
|||||||
params) in list(gs_object['schemas']['Groups']['properties'].items()):
|
params) in list(gs_object['schemas']['Groups']['properties'].items()):
|
||||||
if attrib in ['kind', 'etag', 'email']:
|
if attrib in ['kind', 'etag', 'email']:
|
||||||
continue
|
continue
|
||||||
if myarg == attrib.lower():
|
if myarg == attrib.lower().replace('_', ''):
|
||||||
if params['type'] == 'integer':
|
if params['type'] == 'integer':
|
||||||
try:
|
try:
|
||||||
if value[-1:].upper() == 'M':
|
if value[-1:].upper() == 'M':
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import platform
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
|
GAM_AUTHOR = 'Jay Lee <jay0lee@gmail.com>'
|
||||||
GAM_VERSION = '6.07'
|
GAM_VERSION = '6.08'
|
||||||
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
GAM_LICENSE = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
|
||||||
|
|
||||||
GAM_URL = 'https://git.io/gam'
|
GAM_URL = 'https://git.io/gam'
|
||||||
@@ -1110,7 +1110,8 @@ GROUP_SETTINGS_LIST_ATTRIBUTES = set([
|
|||||||
'whoCanUnmarkFavoriteReplyOnAnyTopic',
|
'whoCanUnmarkFavoriteReplyOnAnyTopic',
|
||||||
'whoCanViewGroup',
|
'whoCanViewGroup',
|
||||||
'whoCanViewMembership',
|
'whoCanViewMembership',
|
||||||
# Miscellaneous hoices
|
# Miscellaneous choices
|
||||||
|
'default_sender',
|
||||||
'messageModerationLevel',
|
'messageModerationLevel',
|
||||||
'replyTo',
|
'replyTo',
|
||||||
'spamModerationLevel',
|
'spamModerationLevel',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ url = https://github.com/jay0lee/GAM
|
|||||||
author = Jay Lee
|
author = Jay Lee
|
||||||
author_email = jay0lee@gmail.com
|
author_email = jay0lee@gmail.com
|
||||||
license = Apache
|
license = Apache
|
||||||
license_file = src/license.rtf
|
license_files = LICENSE
|
||||||
keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive, google-cloud, google-calendar, gam, google-api, oauth2-client, google-workspace
|
keywords = google, oauth2, gsuite, google-apps, google-admin-sdk, google-drive, google-cloud, google-calendar, gam, google-api, oauth2-client, google-workspace
|
||||||
classifiers =
|
classifiers =
|
||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user