def is_db_user_dirbs_role(conn, role_name):
    'Function to test whether the current DB user is in a DIRBS role.'
    with conn.cursor() as cur:
        cur.execute("SELECT pg_has_role(%s, 'MEMBER')", [role_name])
        return cur.fetchone()[0]
Function to test whether the current DB user is in a DIRBS role.
def is_db_user_dirbs_role(conn, role_name):
    
    with conn.cursor() as cur:
        cur.execute("SELECT pg_has_role(%s, 'MEMBER')", [role_name])
        return cur.fetchone()[0]