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 the ConnectionAdmin.generate_requests_only class attribute is set to True.

❌ Raises

  • SecurityRequestError
    Raises SecurityRequestError when the SAF Return Code of a Security Result is equal to 4.
  • DownstreamFatalError
    Raises DownstreamFatalError when the SAF Return Code of a Security Result is greater than 4.

πŸ’» 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 the ConnectionAdmin.generate_requests_only class attribute is set to True.

❌ Raises

  • SecurityRequestError
    Raises SecurityRequestError when the SAF Return Code of a Security Result is equal to 4.
  • DownstreamFatalError
    Raises DownstreamFatalError when the SAF Return Code of a Security Result is greater than 4.

πŸ’» 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
    }
  }
}