Skip to content

Commit

Permalink
Merge pull request #47 from citysciencelab/anonymous-processes
Browse files Browse the repository at this point in the history
Anonymous processes
  • Loading branch information
hwbllmnn authored Oct 1, 2024
2 parents 8822eea + 9dda350 commit 0d7796d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ump/api/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@ def _processes_list(results):
)

for provider in providers.PROVIDERS:
public_access = not "authentication" in providers.PROVIDERS[provider]
provider_access = provider in realm_roles or provider in client_roles
if public_access or provider_access:
if provider_access:
logging.debug(f"Granting access for model server {provider}")
try:
# Check if process has special configuration
for process in results[provider]:
process_id = f"{provider}_{process['id']}"
process_access = process_id in realm_roles or process_id in client_roles
process_config = providers.PROVIDERS[provider]["processes"][process['id']]
public_access = 'anonymous-access' in process_config and process_config['anonymous-access']
if public_access or process_access or provider_access:
logging.debug(f"Granting access for process {process['id']}")

Expand Down

0 comments on commit 0d7796d

Please sign in to comment.