From 02529e0432f158301fa89479d158ac5bf6aefcfe Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Tue, 13 Apr 2021 18:00:51 -0700 Subject: [PATCH] Fixed bug in `gam add datastudiopermissions` that caused a trap. --- src/GamCommands.txt | 4 ++-- src/GamUpdate.txt | 6 +++++- src/gam/__init__.py | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 535aad7c..5bdd6977 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -4273,13 +4273,13 @@ gam add datastudiopermissions [([assettype report|datasource] [title ] [owner ] [includetrashed]) | (assetids )] - (role editor|owner|viewer members )+ + (role editor|owner|viewer members )+ [nodetails] gam delete datastudiopermissions [([assettype report|datasource] [title ] [owner ] [includetrashed]) | (assetids )] - members + members [nodetails] gam print datastudiopermissions [todrive *] diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 8a3dd6c6..6fde5590 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,7 @@ +6.02.01 + +Fixed bug in `gam add datastudiopermissions` that caused a trap. + 6.02.00 Following Jay's lead, aliases are converted to primary email addresses when adding delegates. @@ -5,7 +9,7 @@ Following Jay's lead, aliases are converted to primary email addresses when addi Added commands to display Data Studio assets and display/manage Data Studio permissions. * https://github.com/taers232c/GAMADV-XTD3/wiki/Users-DataStudio -To use these commands you must add the 'Data Studio API' to your project and update your service account authorization. +To use these commands you must add the `Data Studio API` to your project and update your service account authorization. ``` gam update project gam user user@domain.com check serviceaccount diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 1e61d3d9..7c093e19 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -23,7 +23,7 @@ """ __author__ = 'Ross Scroggs ' -__version__ = '6.02.00' +__version__ = '6.02.01' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' import base64 @@ -47059,7 +47059,7 @@ def processDataStudioPermissions(users): if getDataStudioAssetSelectionParameters(myarg, parameters): pass elif myarg in {'assetid', 'assetids'}: - assetIdEntity = getUserObjectEntity(Cmd.OB_USER_ENTITY, Ent.DATASTUDIO_ASSET_ID) + assetIdEntity = getUserObjectEntity(Cmd.OB_USER_ENTITY, Ent.DATASTUDIO_ASSETID) elif action == Act.ADD and myarg == 'role': permissions.setdefault('permissions', {}) role = getChoice(DATASTUDIO_PERMISSION_ROLE_CHOICE_MAP, mapChoice=True)