Commit 4ceae04c authored by Diego Molteni's avatar Diego Molteni
Browse files

Merge branch 'master' into slb/dperez50/entitlementsv2

parents 8a3b178c 869c04db
Pipeline #36141 passed with stages
in 10 minutes and 35 seconds
......@@ -36,7 +36,7 @@ export class SubProjectParser {
subproject.acls = (req.body && req.body.acls) ? req.body.acls : { 'admins': [], 'viewers': [] }
// check user input params
Params.checkEmail(subproject.admin, 'admin', false);
Params.checkString(subproject.admin, 'admin', false);
Params.checkString(subproject.ltag, 'ltag', false);
// This method is temporary required by slb during the migration of sauth from v1 to v2
......
......@@ -23,7 +23,7 @@ export class UserParser {
public static removeUser(req: expRequest): { email: string, sdPath: SDPathModel } {
Params.checkBody(req.body);
Params.checkEmail(req.body.email, 'email');
Params.checkString(req.body.email, 'email');
Params.checkString(req.body.path, 'path');
const email = req.body.email;
......@@ -46,7 +46,7 @@ export class UserParser {
public static addUser(req: expRequest): { email: string, sdPath: SDPathModel, groupRole: string } {
Params.checkBody(req.body);
Params.checkEmail(req.body.email, 'email');
Params.checkString(req.body.email, 'email');
Params.checkString(req.body.path, 'path');
const email = req.body.email;
......
{
"info": {
"_postman_id": "c988bdf3-af9f-48b4-8afd-87ab4650e6d3",
"name": "seismic-store-e2e",
"_postman_id": "260476ac-bbd1-4440-b4d8-c6984dc7e1da",
"name": "SDMS-E2E",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
......@@ -1477,7 +1477,12 @@
"pm.test(\"Check gtag\", function () {",
" pm.expect(jsonData.gtags.length).to.eql(1);",
" pm.expect(jsonData.gtags[0]).to.eql(\"tagA\");",
"});"
"});",
"",
"pm.test(\"ctag\", function () {",
" postman.setEnvironmentVariable(\"ctag\", jsonData.ctag);",
"});",
""
],
"type": "text/javascript"
}
......@@ -1661,6 +1666,73 @@
},
"response": []
},
{
"name": "DATASET DSX01 CHECK CTAG TRUE",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Validate ctag\", function () {",
" pm.expect(pm.response.json()).eql(true);",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{STOKEN}}"
},
{
"key": "x-api-key",
"value": "{{SVC_API_KEY}}"
},
{
"key": "appkey",
"value": "{{DE_APP_KEY}}",
"type": "text"
}
],
"url": {
"raw": "{{SVC_URL}}/dataset/tenant/{{tenant}}/subproject/{{subproject}}/dataset/{{dsx01}}/ctagcheck?path={{testPathEncoded}}&ctag={{ctag}}",
"host": [
"{{SVC_URL}}"
],
"path": [
"dataset",
"tenant",
"{{tenant}}",
"subproject",
"{{subproject}}",
"dataset",
"{{dsx01}}",
"ctagcheck"
],
"query": [
{
"key": "path",
"value": "{{testPathEncoded}}"
},
{
"key": "ctag",
"value": "{{ctag}}"
}
]
}
},
"response": []
},
{
"name": "DATASET PATCH",
"event": [
......@@ -1744,6 +1816,73 @@
},
"response": []
},
{
"name": "DATASET DSX01 CHECK CTAG FALSE",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Validate ctag\", function () {",
" pm.expect(pm.response.json()).eql(false);",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{STOKEN}}"
},
{
"key": "x-api-key",
"value": "{{SVC_API_KEY}}"
},
{
"key": "appkey",
"value": "{{DE_APP_KEY}}",
"type": "text"
}
],
"url": {
"raw": "{{SVC_URL}}/dataset/tenant/{{tenant}}/subproject/{{subproject}}/dataset/{{dsx01}}/ctagcheck?path={{testPathEncoded}}&ctag={{ctag}}",
"host": [
"{{SVC_URL}}"
],
"path": [
"dataset",
"tenant",
"{{tenant}}",
"subproject",
"{{subproject}}",
"dataset",
"{{dsx01}}",
"ctagcheck"
],
"query": [
{
"key": "path",
"value": "{{testPathEncoded}}"
},
{
"key": "ctag",
"value": "{{ctag}}"
}
]
}
},
"response": []
},
{
"name": "DATASET EXIST",
"event": [
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment