Commit Graph

118 Commits

Author SHA1 Message Date
12166e2245 more work on dynamic scope selections 2015-12-30 17:10:06 -05:00
20bba75e41 default scope selections
basic logic is:
-if 1 scope for API, use it
-skip over scopes ending in .readonly, .action or .verify_only UNLESS
all scopes are readonly, use all scopes (this is case with reports api)
-all other scopes are used by default.
2015-12-30 16:12:49 -05:00
881cc4d255 redo of Ross' latest patch against my updates 2015-12-30 15:36:24 -05:00
3d61973071 discovery files for 2 other gdata apis to standardize scope discovery 2015-12-30 15:30:58 -05:00
900fc9c4e3 sanitize some defaults 2015-12-30 14:22:33 -05:00
7aaaaf9125 Fix type, delete obsolete function 2015-12-30 10:59:04 -08:00
df0bcda952 Merge pull request #157 from taers232c/master
no_browser.txt still needed by output_csv
2015-12-30 13:28:49 -05:00
d871378336 dynamically get API scopes for "gam oauth request" 2015-12-30 13:25:06 -05:00
f99add7a3f no_browser.txt still needed by output_csv 2015-12-30 10:20:18 -08:00
7515700b1a fix GC_Defaults dict init 2015-12-30 13:18:56 -05:00
0cd8246bdb remove unused G+ APIs 2015-12-30 12:58:21 -05:00
9e09c06770 gdata scopes as globals 2015-12-30 12:57:42 -05:00
a983d23f91 Define GAM_ADMIN environment variable 2015-12-30 09:52:18 -08:00
08163cc5cd remove some legacy variables 2015-12-30 12:13:57 -05:00
c629c3424c TODOs for a few ugly hard coded hacks 2015-12-30 12:08:37 -05:00
ef403119d9 Intial steps to switch to 100% service accounts
Still need to store admin email and granted scopes in a file as well as
build these on first run.
2015-12-30 11:30:03 -05:00
813d503bb8 use object already avail instead of buildDiscoveryObject() 2015-12-30 09:15:34 -05:00
4d71b6943c Clean up, gam csv optimization
showCalSettings had nested loop over user
doLabel cleaned up, has starting point for parsing arguments passed in
from main
doUpdateUser has starting point for parsing arguments passed in from
main
gam csv processing is optimized. All '~~xxx~~' and '~xxx' substitutions
are found for each argument and loaded into a dictionary once before
the loop. During the loop, the substitutions can be performed quickly.
2015-12-26 08:46:42 -08:00
2df3aef52d more fixes to doVacation 2015-12-25 05:42:47 -05:00
cd766d90e4 Fix doVacation problem 2015-12-24 23:04:40 -08:00
d79c28d2d3 Eliminate unneeded service=, function=, items= in calls to API functions
Saves 5.5kb!
2015-12-23 11:07:08 -08:00
48e6872233 Merge pull request #150 from taers232c/master
Debugging only incompatible with gam batch - and gam csv -
2015-12-23 11:08:04 -05:00
5037a9bbfd Debugging only incompatible with gam batch - and gam csv - 2015-12-23 07:35:36 -08:00
3fcde95fe8 Add "gam print roles" 2015-12-23 09:52:04 -05:00
2235c10df7 handle blank lines it batch 2015-12-23 09:05:03 -05:00
327e09291b disable discovery cache
Disable discovery cache as it broke CSV commands on windows with lock
errors. The cache is new in googleapiclient 1.4.2 which was upgraded
after GAM 3.61:

30125120b4

down the line, we should investigate actual issue with cache as enabling
it would improve GAM performance.
2015-12-23 08:06:22 -05:00
1dd36424be showLabels handle non-Gmail users 2015-12-23 06:55:22 -05:00
ade2d0ae54 handle no results on Gmail profile 2015-12-23 06:50:57 -05:00
ac3dbd25f3 If userid isn't in domain, return blank 2015-12-23 06:32:43 -05:00
4cc775bcae Eliminate try except IndexError in argument parsing 2015-12-22 23:27:42 -08:00
96dfa52dba Clean up parsing transferSecCals, transferDriveFiles 2015-12-22 22:16:33 -08:00
1f1329c536 Ok, allow gam create admin to take uid: or id:abcdefghi for org unit 2015-12-22 20:41:13 -08:00
3bb54f875d In gam create admin, org unit id is id:abcdefghj not uid:abcdefhgi 2015-12-22 20:34:42 -08:00
84b6c1cb87 Handle undefined role 2015-12-22 18:15:15 -08:00
4f4bb316d0 Handle invalid argument in gam print admins 2015-12-22 18:09:22 -08:00
fe6430edc6 Global variables do-over
Global variables not from environment variables/signal files in
GM_Globals
Global variables from environment variables/signal files in GC_Values
SetGlobalVariables processes all environment variables/signal files
buildGAPIObject reworked
buildGAPIServiceObject reworked
Switch resource calendar processing from GData to GAPI
Implement role assignments
2015-12-22 17:56:37 -08:00
c04ae91dc5 Commit Jay changes 2015-12-22 17:37:56 -08:00
14bc340e56 Commit Jays changes 2015-12-22 17:23:43 -08:00
6fd107c230 CSV debug check inadvertently dropped 2015-12-22 16:39:56 -08:00
5f2c2103a5 Revamp environment variables/signal files processing
Global variables not from environment variables/signal files in
GM_Globals
Global variables from environment variables/signal files in GC_Values
SetGlobalVariables processes all environment variables/signal files
buildGAPIObject reworked
buildGAPIServiceObject reworked
Switch resource calendar processing from GData to GAPI
Implement role assignments
2015-12-22 16:10:30 -08:00
24d5a169f6 Standardize server not found error handling 2015-12-19 16:17:09 -08:00
2bc0dd5fbe More cleanup
Handle debug.gam, extra_args.txt in one place
Clean up coding for callGAPIpages
Simplify coding for disable_ssl_certificate_validation
Break up long arg lists into multiple lines for callGData, callGAPI,
callGAPIpages
Handle missing client_secrets.json inline in doRequestOauth
2015-12-19 16:05:43 -08:00
21f01757a3 Make sure that callGData and callGAPI return something 2015-12-17 17:11:17 -08:00
4da936344f Downshift more Boolean values 2015-11-24 18:10:23 -08:00
05920cc7d7 Boolean values were not downshifted in doCreateUser 2015-11-24 17:14:37 -08:00
edb17ad06e Allow reader in doCalendarAddACL, fix infinite loops in doPop, doCreateUser, doUpdateUser 2015-11-24 16:51:06 -08:00
ab6f8fa7bf Update doVacation 2015-11-22 10:57:00 -08:00
b822608b15 Define/use file processing routines; fix show filelist allfields
Define and use new file handling primitives to simply code and isolate
error handling.

Error message cleanup.

Google added a new object (userPermission) to the filesResource object
which broke showDriveFiles because it has an item named 'id' which
wiped out the file id. This fix makes compound column names for all
dictionary objects except for labels.
2015-11-21 09:50:11 -08:00
7a9bda9b1b Guard vacation info with convertUTF8, fix typo in doGetNotifications 2015-11-19 16:46:16 -08:00
3edfce202f Cleanup - use named constants
Use named constants instead of repeated literals
Define messages at top, would make language translation easier
Clean up result handling in doDownloadActivity/ExportRequest
Handle missing Python SSL module in one place

The following two files need to be updated to 3.61
https://gam-update.appspot.com/latest-version-announcement.txt
https://gam-update.appspot.com/latest-version.txt
2015-11-16 07:13:39 -08:00