ncihtan / synapse_acl_reset

🔥 HTAN x Synapse ACL reset
0 stars 0 forks source link

Synapse ACL access fix #8

Closed aditigopalan closed 5 months ago

aditigopalan commented 5 months ago

Fixing make_public.py to assign view permissions to anyone on the web and download permissions to all registered Synapse users for each entity matching specific criteria in the BigQuery dataset.

See REST-API docs

aditigopalan commented 5 months ago

Not sure if this will help, but I tried this (I'm not running anything at the moment just in case):

Parameters:

def put_access_requirement_acl(requirement_id, acl):
    #Update the ACL for a given access requirement by its ID with a new ACL.

    try:
        uri = f"/accessRequirement/{requirement_id}/acl"
        response = requests.put(uri, json=acl, headers=synapseclient.client.Synapse.headers)
        response.raise_for_status()
        print(f"ACL updated successfully for access requirement {requirement_id}")
    except Exception as e:
        print(f"Error updating ACL for access requirement {requirement_id}: {e}")