Skip to content

Commit

Permalink
initialize pre-approved users
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Jan 17, 2025
1 parent 3068c82 commit d8ca4c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions initialize_vault_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,12 @@
if status_code != 200:
sys.exit(2)

# initialize approved users
response, status_code = get_service_store_secret("opa", key="approved_users")
if status_code == 404:
response, status_code = set_service_store_secret("opa", key="approved_users", value=json.dumps({"approved_users": {}}))
if status_code != 200:
sys.exit(2)

# print(json.dumps(results, indent=4))
sys.exit(0)

0 comments on commit d8ca4c8

Please sign in to comment.