Group Operations Authority

Group Connection Administration functions for modifying a userโ€™s Group Operations Authority.

GroupAdmin.give_group_operations_authority()

def give_group_operations_authority(self, userid: str, group: str) -> Union[dict, bytes]:

๐Ÿ“„ Description

Give a user Operations authority within a group.

๐Ÿ“ฅ Parameters

  • userid
    The z/OS userid of the user to give Operations authority to within a group.
  • group
    The group to give the user Operations authority 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_operations_authority("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) OPERATIONS  '}]}, '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) OPERATIONS  "
          }
        ]
      },
      "returnCode": 0,
      "reasonCode": 0
    }
  }
}

GroupAdmin.take_away_group_operations_authority()

def take_away_group_operations_authority(self, userid: str, group: str) -> Union[dict, bytes]:

๐Ÿ“„ Description

Take away a userโ€™s Operations authority within a group.

๐Ÿ“ฅ Parameters

  • userid
    The z/OS userid of the user to take Operations authority away from within a group.
  • group
    The group to take away the userโ€™s Operations 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_operations_authority("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) NOOPERATIONS  '}]}, '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) NOOPERATIONS  "
          }
        ]
      },
      "returnCode": 0,
      "reasonCode": 0
    }
  }
}