Skip to content

Commit

Permalink
Merge pull request #73 from CanDIG/daisieh/program
Browse files Browse the repository at this point in the history
DIG-1522: change cohort to program
  • Loading branch information
daisieh authored Nov 25, 2024
2 parents b108b13 + 2395faa commit ee6c84c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions defaults/paths.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"/htsget/v1/reads/?.*",
"/htsget/v1/samples/?.*",
"/ga4gh/drs/v1/objects/?.*",
"/ga4gh/drs/v1/cohorts/?.*",
"/ga4gh/drs/v1/cohorts/?.*/status",
"/ga4gh/drs/v1/programs/?.*",
"/ga4gh/drs/v1/programs/?.*/status",
"/beacon/v2/g_variants/?.*"
],
"post": [
Expand Down
14 changes: 7 additions & 7 deletions tests/test_opa_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def get_user_datasets():
return [
( # site admin should be able to read all datasets
"site_admin",
{"body": {"path": "/ga4gh/drs/v1/cohorts/", "method": "GET"}},
{"body": {"path": "/ga4gh/drs/v1/programs/", "method": "GET"}},
["SYNTHETIC-1", "SYNTHETIC-2", "SYNTHETIC-3", "SYNTHETIC-4"],
),
( # user1 can view the datasets it's a member of
Expand All @@ -264,7 +264,7 @@ def get_user_datasets():
),
(
"dac_user",
{"body": {"path": "/ga4gh/drs/v1/cohorts", "method": "GET"}},
{"body": {"path": "/ga4gh/drs/v1/programs", "method": "GET"}},
["SYNTHETIC-3"],
),
]
Expand All @@ -281,7 +281,7 @@ def get_curation_allowed():
"site_admin",
{
"body": {
"path": "/ga4gh/drs/v1/cohorts/",
"path": "/ga4gh/drs/v1/programs/",
"method": "POST"
}
},
Expand All @@ -291,7 +291,7 @@ def get_curation_allowed():
"user2",
{
"body": {
"path": "/ga4gh/drs/v1/cohorts/",
"path": "/ga4gh/drs/v1/programs/",
"method": "POST",
"program": "SYNTHETIC-1"
}
Expand All @@ -302,7 +302,7 @@ def get_curation_allowed():
"user1",
{
"body": {
"path": "/ga4gh/drs/v1/cohorts/",
"path": "/ga4gh/drs/v1/programs/",
"method": "POST",
"program": "SYNTHETIC-1"
}
Expand All @@ -313,7 +313,7 @@ def get_curation_allowed():
"user1",
{
"body": {
"path": "/ga4gh/drs/v1/cohorts/",
"path": "/ga4gh/drs/v1/programs/",
"method": "DELETE",
"program": "SYNTHETIC-1"
}
Expand All @@ -324,7 +324,7 @@ def get_curation_allowed():
"user1",
{
"body": {
"path": "/ga4gh/drs/v1/cohorts/",
"path": "/ga4gh/drs/v1/programs/",
"method": "POST",
"program": "SYNTHETIC-2"
}
Expand Down

0 comments on commit ee6c84c

Please sign in to comment.