summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-14 16:50:23 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2021-05-17 17:06:51 +0200
commit05d2318538eba71ac0555dc5ec146499d9cb0592 (patch)
tree6163e6429879109e322a4c0883fab168031aa109 /opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py
parent0c6ccca5fac44ab40671627fd3181e9b138672fa (diff)
api: Remove user handling from OpenDC API server
This change removes any of the user handling and endpoints from the OpenDC API server. The API server does not need to store user information other than an identifier in the database.
Diffstat (limited to 'opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py')
-rw-r--r--opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py b/opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py
index f9ffaf37..03e6758b 100644
--- a/opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py
+++ b/opendc-web/opendc-web-api/opendc/api/v2/projects/projectId/test_endpoint.py
@@ -20,10 +20,7 @@ def test_get_project_not_authorized(client, mocker):
'fetch_one',
return_value={
'_id': test_id,
- 'authorizations': [{
- 'projectId': test_id_2,
- 'authorizationLevel': 'OWN'
- }]
+ 'authorizations': []
})
res = client.get(f'/v2/projects/{test_id}')
assert '403' in res.status
@@ -35,7 +32,7 @@ def test_get_project(client, mocker):
return_value={
'_id': test_id,
'authorizations': [{
- 'projectId': test_id,
+ 'userId': 'test',
'authorizationLevel': 'EDIT'
}]
})
@@ -58,7 +55,7 @@ def test_update_project_not_authorized(client, mocker):
return_value={
'_id': test_id,
'authorizations': [{
- 'projectId': test_id,
+ 'userId': 'test',
'authorizationLevel': 'VIEW'
}]
})
@@ -72,7 +69,7 @@ def test_update_project(client, mocker):
return_value={
'_id': test_id,
'authorizations': [{
- 'projectId': test_id,
+ 'userId': 'test',
'authorizationLevel': 'OWN'
}]
})
@@ -94,7 +91,7 @@ def test_delete_project_different_user(client, mocker):
'_id': test_id,
'googleId': 'other_test',
'authorizations': [{
- 'projectId': test_id,
+ 'userId': 'test',
'authorizationLevel': 'VIEW'
}],
'topologyIds': []
@@ -110,7 +107,7 @@ def test_delete_project(client, mocker):
'_id': test_id,
'googleId': 'test',
'authorizations': [{
- 'projectId': test_id,
+ 'userId': 'test',
'authorizationLevel': 'OWN'
}],
'topologyIds': [],