Browse Source

feat: ui acl post request schema definition

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5174/head
Pranav C 2 years ago
parent
commit
ba352da48c
  1. 2
      packages/nocodb/src/lib/meta/api/modelVisibilityApis.ts
  2. 51
      scripts/sdk/swagger.json

2
packages/nocodb/src/lib/meta/api/modelVisibilityApis.ts

@ -123,7 +123,7 @@ router.get(
router.post(
'/api/v1/db/meta/projects/:projectId/visibility-rules',
metaApiMetrics,
getAjvValidatorMw('swagger.json#/components/schemas/KanbanViewReq'),
getAjvValidatorMw('swagger.json#/components/schemas/VisibilityRuleReq'),
ncMetaAclMw(xcVisibilityMetaSetAll, 'modelVisibilitySet')
);
export default router;

51
scripts/sdk/swagger.json

@ -10127,14 +10127,15 @@
"dtx": {
"type": "string"
},
"dtxp": { "oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
"dtxp": {
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"dtxs": {
"oneOf": [
@ -10144,7 +10145,7 @@
{
"type": "null"
}
]
]
},
"au": {
"type": "boolean"
@ -10313,6 +10314,38 @@
},
"roles": {}
}
},
"VisibilityRuleReq": {
"title": "Visibility Rule",
"type": "array",
"items": {
"type": "object",
"properties": {
"disabled": {
"type": "object",
"properties": {
"commenter": {
"type": "boolean"
},
"creator": {
"type": "boolean"
},
"editor": {
"type": "boolean"
},
"guest": {
"type": "boolean"
},
"owner": {
"type": "boolean"
},
"viewer": {
"type": "boolean"
}
}
}
}
}
}
},
"requestBodies": {

Loading…
Cancel
Save