catalog/api/wsgi.py
def check_user_support_access(api_client):
    """
    Check and return true if api_client is configured with babylon admin access.
    Access is determined by whether the user can directly manage AnarchySubjects.
    """
    (data, status, headers) = api_client.call_api(
        '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews',
        'POST',
        auth_settings = ['BearerToken'],
        body = {
           "apiVersion": "authorization.k8s.io/v1",
           "kind": "SelfSubjectAccessReview",
           "spec": {
             "resourceAttributes": {
               "group": "poolboy.gpte.redhat.com",
               "resource": "resourceclaims",
               "verb": "patch",
             }
           },
           "status": {
             "allowed": False
           }
        },
        response_type = 'object',
    )
    return data.get('status', {}).get('allowed', False)

    Check and return true if api_client is configured with babylon admin access.
    Access is determined by whether the user can directly manage AnarchySubjects.
    
Check and return true if api_client is configured with babylon admin access.
Access is determined by whether the user can directly manage AnarchySubjects.
Check and return true if api_client is configured with babylon admin access . Access is determined by whether the user can directly manage AnarchySubjects .
def check_user_support_access(api_client):
    (data, status, headers) = api_client.call_api(
        '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews',
        'POST',
        auth_settings = ['BearerToken'],
        body = {
           "apiVersion": "authorization.k8s.io/v1",
           "kind": "SelfSubjectAccessReview",
           "spec": {
             "resourceAttributes": {
               "group": "poolboy.gpte.redhat.com",
               "resource": "resourceclaims",
               "verb": "patch",
             }
           },
           "status": {
             "allowed": False
           }
        },
        response_type = 'object',
    )
    return data.get('status', {}).get('allowed', False)
def check_user_support_access ( api_client ) : ( data , status , headers ) = api_client . call_api ( '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews' , 'POST' , auth_settings = [ 'BearerToken' ] , body = { "apiVersion" : "authorization.k8s.io/v1" , "kind" : "SelfSubjectAccessReview" , "spec" : { "resourceAttributes" : { "group" : "poolboy.gpte.redhat.com" , "resource" : "resourceclaims" , "verb" : "patch" , } } , "status" : { "allowed" : False } } , response_type = 'object' , ) return data . get ( 'status' , { } ) . get ( 'allowed' , False )
Check and return true if api_client is configured with babylon admin access.
Check and return true if api_client is configured with babylon admin access .
"""
    Check and return true if api_client is configured with babylon admin access.
    Access is determined by whether the user can directly manage AnarchySubjects.
    """
api_client