aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-07-12 13:50:02 +0300
committerFrederick Muriuki Muriithi2023-07-12 13:50:02 +0300
commitd5bb32d0c09617a47732064a95c33bf53a2e7c13 (patch)
tree600e679b8703fc28f6ad78c80d2fc483c193efb1 /gn3
parent88bc76842a2f35e35ca9d2727e2a09131ce7c0c1 (diff)
downloadgenenetwork3-d5bb32d0c09617a47732064a95c33bf53a2e7c13.tar.gz
Move documentation comment to beginning of function
Diffstat (limited to 'gn3')
-rw-r--r--gn3/auth/authorisation/data/views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gn3/auth/authorisation/data/views.py b/gn3/auth/authorisation/data/views.py
index d84b080..e899bdf 100644
--- a/gn3/auth/authorisation/data/views.py
+++ b/gn3/auth/authorisation/data/views.py
@@ -51,6 +51,11 @@ def list_species() -> Response:
@require_json
def authorisation() -> Response:
"""Retrive the authorisation level for datasets/traits for the user."""
+ # Access endpoint with something like:
+ # curl -X POST http://127.0.0.1:8080/api/oauth2/data/authorisation \
+ # -H "Content-Type: application/json" \
+ # -d '{"traits": ["HC_M2_0606_P::1442370_at", "BXDGeno::01.001.695",
+ # "BXDPublish::10001"]}'
db_uri = app.config["AUTH_DB"]
privileges = {}
user = User(uuid.uuid4(), "anon@ymous.user", "Anonymous User")
@@ -81,11 +86,6 @@ def authorisation() -> Response:
else:
raise exc from None
- # Access endpoint with somethin like:
- # curl -X POST http://127.0.0.1:8080/api/oauth2/data/authorisation \
- # -H "Content-Type: application/json" \
- # -d '{"traits": ["HC_M2_0606_P::1442370_at", "BXDGeno::01.001.695",
- # "BXDPublish::10001"]}'
def __gen_key__(resource, data_item):
if resource.resource_category.resource_category_key.lower() == "phenotype":
return (