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. 35
      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;

35
scripts/sdk/swagger.json

@ -10127,7 +10127,8 @@
"dtx": {
"type": "string"
},
"dtxp": { "oneOf": [
"dtxp": {
"oneOf": [
{
"type": "string"
},
@ -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