Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 4, 2023
1 parent 407e33b commit c668b60
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions dsp_permissions_scripts/utils/doap_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,6 @@ def __filter_doaps_by_target(
return filtered_doaps


# TODO: this function is unused
def get_permissions_for_project(
project_iri: str,
host: str,
token: str,
) -> list[dict[str, Any]]:
"""
Returns all permissions for the given project.
"""
headers = {"Authorization": f"Bearer {token}"}
project_iri = quote_plus(project_iri, safe="")
protocol = get_protocol(host)
url = f"{protocol}://{host}/admin/permissions/{project_iri}"
response = requests.get(url, headers=headers, timeout=5)
assert response.status_code == 200
permissions: list[dict[str, Any]] = response.json()["permissions"]
return permissions


def __get_all_doaps_of_project(
project_iri: str,
host: str,
Expand Down

0 comments on commit c668b60

Please sign in to comment.