Removed inheritance from gam create|update|info|print org

This commit is contained in:
Ross Scroggs
2025-11-19 17:09:13 -08:00
parent aa62ac4f3c
commit d5d17676cc
3 changed files with 11 additions and 31 deletions

View File

@@ -4451,22 +4451,21 @@ gam print mobile [todrive <ToDriveAttribute>*]
<OrgUnitFieldName> ::=
description|
id|orgunitid|
inherit|blockinheritance|
name|
parentid|parentorgunitid|
parent|parentorgunitpath|
path|orgunitpath
<OrgUnitFieldNameList> ::= "<OrgUnitFieldName>(,<OrgUnitFieldName>)*"
gam create|add org|ou <OrgUnitPath> [description <String>] [parent <OrgUnitItem>] [inherit|(blockinheritance False)] [buildpath]
gam update org|ou <OrgUnitItem> [name <String>] [description <String>] [parent <OrgUnitItem>] [inherit|(blockinheritance False)]
gam create|add org|ou <OrgUnitPath> [description <String>] [parent <OrgUnitItem>] [buildpath]
gam update org|ou <OrgUnitItem> [name <String>] [description <String>] [parent <OrgUnitItem>]
gam update org|ou <OrgUnitItem> add|move <CrOSTypeEntity> [quickcrosmove [<Boolean>]]
gam update org|ou <OrgUnitItem> add|move <UserTypeEntity>
gam update org|ou <OrgUnitItem> sync <CrOSTypeEntity> [removetoou <OrgUnitItem>] [quickcrosmove [<Boolean>]]
gam update org|ou <OrgUnitItem> sync <UserTypeEntity> [removetoou <OrgUnitItem>]
gam delete org|ou <OrgUnitItem>
gam update orgs|ous <OrgUnitEntity> [name <String>] [description <String>] [parent <OrgUnitItem>] [inherit|(blockinheritance False)]
gam update orgs|ous <OrgUnitEntity> [name <String>] [description <String>] [parent <OrgUnitItem>]
gam update orgs|ous <OrgUnitEntity> add|move <CrOSTypeEntity> [quickcrosmove [<Boolean>]]
gam update orgs|ous <OrgUnitEntity> add|move <UserTypeEntity>
gam update orgs|ous <OrgUnitEntity> sync <CrOSTypeEntity> [removetoou <OrgUnitItem>] [quickcrosmove [<Boolean>]]

View File

@@ -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.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__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 <String> [description <String>] [parent <OrgUnitItem>] [inherit|(blockinheritance False)] [buildpath]
# gam create org|ou <String> [description <String>] [parent <OrgUnitItem>] [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 <OrgUnitEntity> [name <String>] [description <String>] [parent <OrgUnitItem>] [inherit|(blockinheritance False)]
# gam update orgs|ous <OrgUnitEntity> [name <String>] [description <String>] [parent <OrgUnitItem>]
# gam update orgs|ous <OrgUnitEntity> add|move <CrosTypeEntity> [quickcrosmove [<Boolean>]]
# gam update orgs|ous <OrgUnitEntity> add|move <UserTypeEntity>
# gam update orgs|ous <OrgUnitEntity> sync <CrosTypeEntity> [removetoou <OrgUnitItem>] [quickcrosmove [<Boolean>]]
@@ -17964,7 +17944,7 @@ def _doUpdateOrgs(entityList):
def doUpdateOrgs():
_doUpdateOrgs(getEntityList(Cmd.OB_ORGUNIT_ENTITY, shlexSplit=True))
# gam update org|ou <OrgUnitItem> [name <String>] [description <String>] [parent <OrgUnitItem>] [inherit|(blockinheritance False)]
# gam update org|ou <OrgUnitItem> [name <String>] [description <String>] [parent <OrgUnitItem>]
# gam update org|ou <OrgUnitItem> add|move <CrosTypeEntity> [quickcrosmove [<Boolean>]]
# gam update org|ou <OrgUnitItem> add|move <UserTypeEntity>
# gam update org|ou <OrgUnitItem> sync <CrosTypeEntity> [removetoou <OrgUnitItem>] [quickcrosmove [<Boolean>]]
@@ -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',