Skip to content

Commit

Permalink
remove update_permissions_for_resources_and_values()
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Oct 4, 2023
1 parent 4fb850d commit bd1975b
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions dsp_permissions_scripts/utils/oap.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,15 @@ def apply_updated_oaps_on_server(
logger.info("=====")
logger.info(msg)
print(f"{get_timestamp()}: {msg}")
update_permissions_for_resources_and_values(
resource_iris=[resource_oap.object_iri],
__update_permissions_for_resource_and_values(
resource_iri=resource_oap.object_iri,
scope=resource_oap.scope,
host=host,
token=token,
)
logger.info(f"Updated permissions of resource {resource_oap.object_iri} and its values.")


def update_permissions_for_resources_and_values(
resource_iris: list[str],
scope: PermissionScope,
host: str,
token: str,
) -> None:
"""
Updates the permissions for the given resources and their values.
"""
for iri in resource_iris:
__update_permissions_for_resource_and_values(iri, scope, host, token)


def __update_permissions_for_resource_and_values(
resource_iri: str,
scope: PermissionScope,
Expand Down

0 comments on commit bd1975b

Please sign in to comment.