From 652a1676d8204965c09c71f9cec24afe6e4318dd Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 18 Jun 2024 19:06:19 +0000 Subject: [PATCH] test: extract title from base in context --- packages/nc-gui/lib/acl.ts | 2 -- packages/nocodb/src/utils/acl.ts | 4 ---- tests/playwright/tests/db/general/sourceRestrictions.spec.ts | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/nc-gui/lib/acl.ts b/packages/nc-gui/lib/acl.ts index d0124c0853..6755e87024 100644 --- a/packages/nc-gui/lib/acl.ts +++ b/packages/nc-gui/lib/acl.ts @@ -143,8 +143,6 @@ export const sourceRestrictions = { csvImport: true, jsonImport: true, excelImport: true, - fieldAdd: true, - fieldAlter: true, duplicateColumn: true, duplicateModel: true, }, diff --git a/packages/nocodb/src/utils/acl.ts b/packages/nocodb/src/utils/acl.ts index a9184eb5fb..5111c5c595 100644 --- a/packages/nocodb/src/utils/acl.ts +++ b/packages/nocodb/src/utils/acl.ts @@ -457,9 +457,6 @@ export const sourceRestrictions = { tableCreate: true, tableDelete: true, tableUpdate: true, - // columnAdd: true, - // columnDelete: true, - // columnUpdate: true, columnBulk: true, }, [SourceRestriction.DATA_READONLY]: { @@ -479,5 +476,4 @@ export const sourceRestrictions = { }, }; - export default rolePermissions; diff --git a/tests/playwright/tests/db/general/sourceRestrictions.spec.ts b/tests/playwright/tests/db/general/sourceRestrictions.spec.ts index 8510170c14..c218a81642 100644 --- a/tests/playwright/tests/db/general/sourceRestrictions.spec.ts +++ b/tests/playwright/tests/db/general/sourceRestrictions.spec.ts @@ -29,7 +29,7 @@ test.describe('Source Restrictions', () => { }); test('Readonly data source', async () => { - await dashboard.treeView.openProjectSourceSettings({ title: context.defaultProjectTitle, context }); + await dashboard.treeView.openProjectSourceSettings({ title: context.base.title, context }); await settingsPage.selectTab({ tab: 'dataSources' }); await dashboard.rootPage.waitForTimeout(300); @@ -56,7 +56,7 @@ test.describe('Source Restrictions', () => { }); test('Readonly schema source', async () => { - await dashboard.treeView.openProjectSourceSettings({ title: context.defaultProjectTitle, context }); + await dashboard.treeView.openProjectSourceSettings({ title: context.base.title, context }); await settingsPage.selectTab({ tab: 'dataSources' }); await dashboard.rootPage.waitForTimeout(300);