From d5d17676cc8960563bb4ee928286c60d185135cb Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Wed, 19 Nov 2025 17:09:13 -0800 Subject: [PATCH] Removed inheritance from `gam create|update|info|print org` --- src/GamCommands.txt | 7 +++---- src/GamUpdate.txt | 4 ++++ src/gam/__init__.py | 31 ++++--------------------------- 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/src/GamCommands.txt b/src/GamCommands.txt index 523b73a1..2936ad61 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -4451,22 +4451,21 @@ gam print mobile [todrive *] ::= description| id|orgunitid| - inherit|blockinheritance| name| parentid|parentorgunitid| parent|parentorgunitpath| path|orgunitpath ::= "(,)*" -gam create|add org|ou [description ] [parent ] [inherit|(blockinheritance False)] [buildpath] -gam update org|ou [name ] [description ] [parent ] [inherit|(blockinheritance False)] +gam create|add org|ou [description ] [parent ] [buildpath] +gam update org|ou [name ] [description ] [parent ] gam update org|ou add|move [quickcrosmove []] gam update org|ou add|move gam update org|ou sync [removetoou ] [quickcrosmove []] gam update org|ou sync [removetoou ] gam delete org|ou -gam update orgs|ous [name ] [description ] [parent ] [inherit|(blockinheritance False)] +gam update orgs|ous [name ] [description ] [parent ] gam update orgs|ous add|move [quickcrosmove []] gam update orgs|ous add|move gam update orgs|ous sync [removetoou ] [quickcrosmove []] diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index 64af5c80..c4604826 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,7 @@ +7.28.11 + +Removed all options/fields referencing inheritance from `gam create|update|info|print org` as this option/field is deprecated. + 7.28.10 Added a command `gam print course-counts` that dsplays the count of the number of courses in which a teacher or student is a participant. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index aa3408b2..5a128c81 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.28.10' +__version__ = '7.28.11' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' #pylint: disable=wrong-import-position @@ -17603,23 +17603,7 @@ def doShowTransferApps(): Ind.Decrement() Ind.Decrement() -def _getOrgInheritance(myarg, body): - if myarg == 'noinherit': - Cmd.Backup() - deprecatedArgumentExit(myarg) - elif myarg == 'inherit': - body['blockInheritance'] = False - elif myarg in {'blockinheritance', 'inheritanceblocked'}: - location = Cmd.Location()-1 - if getBoolean(): - Cmd.SetLocation(location) - deprecatedArgumentExit(myarg) - body['blockInheritance'] = False - else: - return False - return True - -# gam create org|ou [description ] [parent ] [inherit|(blockinheritance False)] [buildpath] +# gam create org|ou [description ] [parent ] [buildpath] def doCreateOrg(): def _createOrg(body, parentPath, fullPath): @@ -17648,8 +17632,6 @@ def doCreateOrg(): body['description'] = getStringWithCRsNLs() elif myarg == 'parent': parent = getOrgUnitItem() - elif _getOrgInheritance(myarg, body): - pass elif myarg == 'buildpath': buildPath = True else: @@ -17933,8 +17915,6 @@ def _doUpdateOrgs(entityList): body['parentOrgUnitId'] = parent else: body['parentOrgUnitPath'] = parent - elif _getOrgInheritance(myarg, body): - pass else: unknownArgumentExit() i = 0 @@ -17956,7 +17936,7 @@ def _doUpdateOrgs(entityList): except (GAPI.badRequest, GAPI.invalidCustomerId, GAPI.loginRequired): checkEntityAFDNEorAccessErrorExit(cd, Ent.ORGANIZATIONAL_UNIT, orgUnitPath) -# gam update orgs|ous [name ] [description ] [parent ] [inherit|(blockinheritance False)] +# gam update orgs|ous [name ] [description ] [parent ] # gam update orgs|ous add|move [quickcrosmove []] # gam update orgs|ous add|move # gam update orgs|ous sync [removetoou ] [quickcrosmove []] @@ -17964,7 +17944,7 @@ def _doUpdateOrgs(entityList): def doUpdateOrgs(): _doUpdateOrgs(getEntityList(Cmd.OB_ORGUNIT_ENTITY, shlexSplit=True)) -# gam update org|ou [name ] [description ] [parent ] [inherit|(blockinheritance False)] +# gam update org|ou [name ] [description ] [parent ] # gam update org|ou add|move [quickcrosmove []] # gam update org|ou add|move # gam update org|ou sync [removetoou ] [quickcrosmove []] @@ -18096,9 +18076,6 @@ def doInfoOrgs(): _doInfoOrgs(getEntityList(Cmd.OB_ORGUNIT_ENTITY, shlexSplit=True)) ORG_ARGUMENT_TO_FIELD_MAP = { - 'blockinheritance': 'blockInheritance', - 'inheritanceblocked': 'blockInheritance', - 'inherit': 'blockInheritance', 'description': 'description', 'id': 'orgUnitId', 'name': 'name',