Browse Source

fix: allow editor user to add/remove nested record

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1707/head
Pranav C 3 years ago
parent
commit
6a3751d886
  1. 4
      packages/nocodb/src/lib/noco/meta/api/dataApis/dataAliasNestedApis.ts
  2. 4
      packages/nocodb/src/lib/utils/projectAcl.ts

4
packages/nocodb/src/lib/noco/meta/api/dataApis/dataAliasNestedApis.ts

@ -191,7 +191,7 @@ export async function hmList(req: Request, res: Response, next) {
}
//@ts-ignore
async function relationDataDelete(req, res) {
async function relationDataRemove(req, res) {
const { model, view } = await getViewAndModelFromRequestByAliasOrId(req);
if (!model) NcError.notFound('Table not found');
@ -273,7 +273,7 @@ router.post(
);
router.delete(
'/api/v1/db/data/:orgs/:projectName/:tableName/:rowId/:relationType/:columnName/:refRowId',
ncMetaAclMw(relationDataDelete, 'relationDataDelete')
ncMetaAclMw(relationDataRemove, 'relationDataRemove')
);
router.get(

4
packages/nocodb/src/lib/utils/projectAcl.ts

@ -122,7 +122,9 @@ export default {
bulkDataUpdate: true,
bulkDataUpdateAll: true,
bulkDataDelete: true,
bulkDataDeleteAll: true
bulkDataDeleteAll: true,
relationDataRemove: true,
relationDataAdd: true
},
commenter: {
formViewGet: true,

Loading…
Cancel
Save