mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 20:31:35 +00:00
Merge branch 'main' of https://github.com/jay0lee/GAM
This commit is contained in:
4
.github/actions/macos-before-install.sh
vendored
4
.github/actions/macos-before-install.sh
vendored
@@ -22,11 +22,7 @@ cd ~
|
|||||||
|
|
||||||
# Use official Python.org version of Python which is backwards compatible
|
# Use official Python.org version of Python which is backwards compatible
|
||||||
# with older MacOS versions
|
# with older MacOS versions
|
||||||
if [ "$PLATFORM" == "x86_64" ]; then
|
|
||||||
export pyfile=python-$BUILD_PYTHON_VERSION-macosx10.9.pkg
|
|
||||||
else
|
|
||||||
export pyfile=python-$BUILD_PYTHON_VERSION-macos11.pkg
|
export pyfile=python-$BUILD_PYTHON_VERSION-macos11.pkg
|
||||||
fi
|
|
||||||
|
|
||||||
wget https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/$pyfile
|
wget https://www.python.org/ftp/python/$BUILD_PYTHON_VERSION/$pyfile
|
||||||
echo "installing Python $BUILD_PYTHON_VERSION..."
|
echo "installing Python $BUILD_PYTHON_VERSION..."
|
||||||
|
|||||||
4
.github/actions/windows-before-install.sh
vendored
4
.github/actions/windows-before-install.sh
vendored
@@ -13,8 +13,8 @@ echo "This is a ${BITS}-bit build for ${PLATFORM}"
|
|||||||
export mypath=$(pwd)
|
export mypath=$(pwd)
|
||||||
cd ~
|
cd ~
|
||||||
|
|
||||||
export python="python"
|
export python="c:\python\python.exe"
|
||||||
export pip="pip"
|
export pip="c:\python\scripts\pip.exe"
|
||||||
|
|
||||||
# pyscard needs swig, keep these two together
|
# pyscard needs swig, keep these two together
|
||||||
choco install $CHOCOPTIONS swig
|
choco install $CHOCOPTIONS swig
|
||||||
|
|||||||
4
.github/actions/windows-install.sh
vendored
4
.github/actions/windows-install.sh
vendored
@@ -7,9 +7,7 @@ echo "compiling GAM with pyinstaller..."
|
|||||||
export distpath="dist/"
|
export distpath="dist/"
|
||||||
export gampath="${distpath}gam"
|
export gampath="${distpath}gam"
|
||||||
rm -rf $gampath
|
rm -rf $gampath
|
||||||
#mkdir -p $gampath
|
/c/python/scripts/pyinstaller --clean --noupx --distpath $gampath gam.spec
|
||||||
#export gampath=$(readlink -e $gampath)
|
|
||||||
pyinstaller --clean --noupx --distpath $gampath gam.spec
|
|
||||||
export gam="${gampath}/gam"
|
export gam="${gampath}/gam"
|
||||||
echo "running compiled GAM..."
|
echo "running compiled GAM..."
|
||||||
$gam version
|
$gam version
|
||||||
|
|||||||
37
.github/workflows/build.yml
vendored
37
.github/workflows/build.yml
vendored
@@ -12,13 +12,13 @@ defaults:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_PYTHON_VERSION: "3.9.5"
|
BUILD_PYTHON_VERSION: "3.9.6"
|
||||||
MIN_PYTHON_VERSION: "3.9.5"
|
MIN_PYTHON_VERSION: "3.9.6"
|
||||||
BUILD_OPENSSL_VERSION: "1.1.1k"
|
BUILD_OPENSSL_VERSION: "1.1.1k"
|
||||||
MIN_OPENSSL_VERSION: "1.1.1k"
|
MIN_OPENSSL_VERSION: "1.1.1k"
|
||||||
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: "000275e409640320cdd995a7f077abfdece86749"
|
PYINSTALLER_VERSION: "0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -41,11 +41,6 @@ jobs:
|
|||||||
goal: "build"
|
goal: "build"
|
||||||
gamos: "linux"
|
gamos: "linux"
|
||||||
platform: "x86_64"
|
platform: "x86_64"
|
||||||
- os: macos-10.15
|
|
||||||
jid: 4
|
|
||||||
goal: "build"
|
|
||||||
gamos: "macos"
|
|
||||||
platform: "x86_64"
|
|
||||||
- os: macos-11.0
|
- os: macos-11.0
|
||||||
jid: 12
|
jid: 12
|
||||||
goal: "build"
|
goal: "build"
|
||||||
@@ -55,7 +50,6 @@ jobs:
|
|||||||
jid: 5
|
jid: 5
|
||||||
goal: "build"
|
goal: "build"
|
||||||
gamos: "windows"
|
gamos: "windows"
|
||||||
python: 3.9.5
|
|
||||||
pyarch: "x64"
|
pyarch: "x64"
|
||||||
platform: "x86_64"
|
platform: "x86_64"
|
||||||
- os: windows-2019
|
- os: windows-2019
|
||||||
@@ -63,7 +57,6 @@ jobs:
|
|||||||
goal: "build"
|
goal: "build"
|
||||||
gamos: "windows"
|
gamos: "windows"
|
||||||
platform: "x86"
|
platform: "x86"
|
||||||
python: 3.9.5
|
|
||||||
pyarch: "x86"
|
pyarch: "x86"
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
goal: "test"
|
goal: "test"
|
||||||
@@ -104,7 +97,7 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
~/python
|
~/python
|
||||||
~/ssl
|
~/ssl
|
||||||
key: ${{ matrix.os }}-${{ matrix.jid }}-20210611
|
key: ${{ matrix.os }}-${{ matrix.jid }}-20210628
|
||||||
|
|
||||||
- name: Set env variables
|
- name: Set env variables
|
||||||
env:
|
env:
|
||||||
@@ -119,13 +112,33 @@ jobs:
|
|||||||
echo "PLATFORM=${PLATFORM}" >> $GITHUB_ENV
|
echo "PLATFORM=${PLATFORM}" >> $GITHUB_ENV
|
||||||
uname -a
|
uname -a
|
||||||
|
|
||||||
- name: Use pre-compiled Python for testing and Windows
|
- name: Use pre-compiled Python for testing
|
||||||
if: matrix.python != ''
|
if: matrix.python != ''
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
architecture: ${{ matrix.pyarch }}
|
architecture: ${{ matrix.pyarch }}
|
||||||
|
|
||||||
|
- name: Install Python on Windows
|
||||||
|
if: matrix.os == 'windows-2019'
|
||||||
|
run: |
|
||||||
|
if ( ${Env:PLATFORM} -eq "x86_64" )
|
||||||
|
{
|
||||||
|
Set-Variable -name py_arch -value "-amd64"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Set-Variable -name py_arch -value ""
|
||||||
|
}
|
||||||
|
Write-Output "py_arch: $py_arch"
|
||||||
|
Set-Variable -name python_file -value "python-${Env:BUILD_PYTHON_VERSION}${py_arch}.exe"
|
||||||
|
Write-Output "python_file: $python_file"
|
||||||
|
Set-Variable -name python_url -value "https://www.python.org/ftp/python/${Env:BUILD_PYTHON_VERSION}/${python_file}"
|
||||||
|
Write-Output "python_url: $python_url"
|
||||||
|
Invoke-WebRequest -Uri $python_url -OutFile $python_file
|
||||||
|
Start-Process -wait -FilePath $python_file -ArgumentList "/quiet","InstallAllUsers=1","TargetDir=c:\\python","AssociateFiles=1","PrependPath=1"
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
- name: Set env variables for pre-compiled Python
|
- name: Set env variables for pre-compiled Python
|
||||||
if: matrix.goal == 'test'
|
if: matrix.goal == 'test'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
lastmodifyinguser|
|
lastmodifyinguser|
|
||||||
lastmodifyingusername|
|
lastmodifyingusername|
|
||||||
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|
|
||||||
|
linksharemetadata|
|
||||||
md5|md5checksum|md5sum|
|
md5|md5checksum|md5sum|
|
||||||
mime|mimetype|
|
mime|mimetype|
|
||||||
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|
|
||||||
@@ -345,6 +346,7 @@ If an item contains spaces, it should be surrounded by ".
|
|||||||
parents|
|
parents|
|
||||||
permissions|
|
permissions|
|
||||||
quotabytesused|quotaused|
|
quotabytesused|quotaused|
|
||||||
|
resourcekey|
|
||||||
restricted|
|
restricted|
|
||||||
shareable|
|
shareable|
|
||||||
shared|
|
shared|
|
||||||
@@ -695,6 +697,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
|
|||||||
copyrequireswriterpermission|
|
copyrequireswriterpermission|
|
||||||
(lastviewedbyme <Time>)|(modifieddate|modifiedtime <Time>)|(description <String>)|(mimetype <MimeType>)|
|
(lastviewedbyme <Time>)|(modifieddate|modifiedtime <Time>)|(description <String>)|(mimetype <MimeType>)|
|
||||||
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|writerscanshare
|
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|writerscanshare
|
||||||
|
(securityupdate <Boolean>)|
|
||||||
(shortcut <DriveFileID>)
|
(shortcut <DriveFileID>)
|
||||||
<DriveFileUpdateAttribute> ::=
|
<DriveFileUpdateAttribute> ::=
|
||||||
(localfile <FileName>|-)|
|
(localfile <FileName>|-)|
|
||||||
@@ -705,6 +708,7 @@ Specify a collection of Users by directly specifying them or by specifiying item
|
|||||||
(copyrequireswriterpermission <Boolean>)|
|
(copyrequireswriterpermission <Boolean>)|
|
||||||
(lastviewedbyme <Time>)|(modifieddate <Time>)|(description <String>)|(mimetype <MimeType>)|
|
(lastviewedbyme <Time>)|(modifieddate <Time>)|(description <String>)|(mimetype <MimeType>)|
|
||||||
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|writerscanshare
|
(parentid <DriveFolderID>)|(parentname <DriveFolderName>)|(anyownerparentname <DriveFolderName>)|writerscantshare|writerscanshare
|
||||||
|
(securityupdate <Boolean>)|
|
||||||
(shortcut <DriveFileID>)
|
(shortcut <DriveFileID>)
|
||||||
<GroupSettingsAttribute> ::=
|
<GroupSettingsAttribute> ::=
|
||||||
(allowexternalmembers <Boolean>)|
|
(allowexternalmembers <Boolean>)|
|
||||||
@@ -955,6 +959,7 @@ gam report <ActivityApplicationName> [todrive]
|
|||||||
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath>)]
|
[(user all|<UserItem>)|(orgunit|org|ou <OrgUnitPath>)]
|
||||||
[start <Time>] [end <Time>]
|
[start <Time>] [end <Time>]
|
||||||
[filter|filters <String>] [event <String>] [ip <String>]
|
[filter|filters <String>] [event <String>] [ip <String>]
|
||||||
|
[groupidfilter <String>]
|
||||||
|
|
||||||
gam create admin <UserItem> <RoleItem> customer|(org_unit <OrgUnitItem>)
|
gam create admin <UserItem> <RoleItem> customer|(org_unit <OrgUnitItem>)
|
||||||
gam delete admin <RoleAssignmentId>
|
gam delete admin <RoleAssignmentId>
|
||||||
|
|||||||
@@ -3721,7 +3721,7 @@ def getDriveFileAttribute(i, body, parameters, myarg, update=False):
|
|||||||
i += 2
|
i += 2
|
||||||
elif myarg == 'securityupdate':
|
elif myarg == 'securityupdate':
|
||||||
body['linkShareMetadata'] = {'securityUpdateEnabled': getBoolean(
|
body['linkShareMetadata'] = {'securityUpdateEnabled': getBoolean(
|
||||||
sys.argv[i+1], f'gam <users> {operation} drivefile'), 'securityUpdateElibible': True}
|
sys.argv[i+1], f'gam <users> {operation} drivefile'), 'securityUpdateEligible': True}
|
||||||
i += 2
|
i += 2
|
||||||
else:
|
else:
|
||||||
controlflow.invalid_argument_exit(
|
controlflow.invalid_argument_exit(
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ def showReport():
|
|||||||
customerId = GC_Values[GC_CUSTOMER_ID]
|
customerId = GC_Values[GC_CUSTOMER_ID]
|
||||||
if customerId == MY_CUSTOMER:
|
if customerId == MY_CUSTOMER:
|
||||||
customerId = None
|
customerId = None
|
||||||
filters = parameters = actorIpAddress = startTime = endTime = eventName = orgUnitId = None
|
filters = parameters = actorIpAddress = groupIdFilter = startTime = endTime = eventName = orgUnitId = None
|
||||||
tryDate = datetime.date.today().strftime(YYYYMMDD_FORMAT)
|
tryDate = datetime.date.today().strftime(YYYYMMDD_FORMAT)
|
||||||
to_drive = False
|
to_drive = False
|
||||||
userKey = 'all'
|
userKey = 'all'
|
||||||
@@ -330,6 +330,9 @@ def showReport():
|
|||||||
elif myarg == 'ip':
|
elif myarg == 'ip':
|
||||||
actorIpAddress = sys.argv[i + 1]
|
actorIpAddress = sys.argv[i + 1]
|
||||||
i += 2
|
i += 2
|
||||||
|
elif myarg == 'groupidfilter':
|
||||||
|
groupIdFilter = sys.argv[i + 1]
|
||||||
|
i += 2
|
||||||
elif myarg == 'todrive':
|
elif myarg == 'todrive':
|
||||||
to_drive = True
|
to_drive = True
|
||||||
i += 1
|
i += 1
|
||||||
@@ -489,7 +492,8 @@ def showReport():
|
|||||||
endTime=endTime,
|
endTime=endTime,
|
||||||
eventName=eventName,
|
eventName=eventName,
|
||||||
filters=filters,
|
filters=filters,
|
||||||
orgUnitID=orgUnitId)
|
orgUnitID=orgUnitId,
|
||||||
|
groupIdFilter=groupIdFilter)
|
||||||
if activities:
|
if activities:
|
||||||
titles = ['name']
|
titles = ['name']
|
||||||
csvRows = []
|
csvRows = []
|
||||||
|
|||||||
@@ -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.06'
|
GAM_VERSION = '6.07'
|
||||||
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'
|
||||||
|
|||||||
Reference in New Issue
Block a user