Group Access Attribute
Group Connection Administration functions for modifying a userβs Group Access Attribute.
GroupAdmin.give_group_access_attribute()
def give_group_access_attribute(self, userid: str, group: str) -> Union[dict, bytes]:
π Description
Set the Access Attribute of a user within a group
π₯ Parameters
userid
The z/OS userid of the user to give the Access Attribute to within a group.group
The group to give the user the Access Attribute in.
π€ Returns
Union[dict, bytes]
Returns a Security Result Steps dictionary or concatenated Security Request XML bytes if theConnectionAdmin.generate_requests_only
class attribute is set toTrue
.
β Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
π» Example
Python REPL
>>> from pyracf import ConnectionAdmin
>>> connection_admin = ConnectionAdmin()
>>> connection_admin.give_group_access_attribute("squidwrd", "testgrp0")
{'step1': {'securityResult': {'groupConnection': {'name': 'SQUIDWRD', 'group': 'TESTGRP0', 'operation': 'set', 'requestId': 'ConnectionRequest', 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'CONNECT SQUIDWRD GROUP (TESTGRP0) GRPACC '}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}}
Security Result Steps Dictionary as JSON
{
"step1": {
"securityResult": {
"groupConnection": {
"name": "SQUIDWRD",
"group": "TESTGRP0",
"operation": "set",
"requestId": "ConnectionRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "CONNECT SQUIDWRD GROUP (TESTGRP0) GRPACC "
}
]
},
"returnCode": 0,
"reasonCode": 0
}
}
}
GroupAdmin.take_away_group_access_attribute()
def take_away_group_access_attribute(self, userid: str, group: str) -> Union[dict, bytes]:
π Description
Take remove the Access Attribute from a user within a group.
π₯ Parameters
userid
The z/OS userid of the user to remove the Access Attribute from within a group.group
The group to remove the userβs Access Attribute in.
π€ Returns
Union[dict, bytes]
Returns a Security Result Steps dictionary or Concatenated Security Request XML bytes if theConnectionAdmin.generate_requests_only
class attribute is set toTrue
.
β Raises
SecurityRequestError
RaisesSecurityRequestError
when the SAF Return Code of a Security Result is equal to4
.DownstreamFatalError
RaisesDownstreamFatalError
when the SAF Return Code of a Security Result is greater than4
.
π» Example
Python REPL
>>> from pyracf import UserAdmin
>>> user_admin = UserAdmin()
>>> connection_admin.take_away_group_access_attribute("squidwrd", "testgrp0")
{'step1': {'securityResult': {'groupConnection': {'name': 'SQUIDWRD', 'group': 'TESTGRP0', 'operation': 'set', 'requestId': 'ConnectionRequest', 'commands': [{'safReturnCode': 0, 'returnCode': 0, 'reasonCode': 0, 'image': 'CONNECT SQUIDWRD GROUP (TESTGRP0) NOGRPACC '}]}, 'returnCode': 0, 'reasonCode': 0, 'runningUserid': 'testuser'}}}
Security Result Steps Dictionary as JSON
{
"step1": {
"securityResult": {
"groupConnection": {
"name": "SQUIDWRD",
"group": "TESTGRP0",
"operation": "set",
"requestId": "ConnectionRequest",
"commands": [
{
"safReturnCode": 0,
"returnCode": 0,
"reasonCode": 0,
"image": "CONNECT SQUIDWRD GROUP (TESTGRP0) NOGRPACC "
}
]
},
"returnCode": 0,
"reasonCode": 0
}
}
}