diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue b/packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
index a7458e41ed..b57be8f00c 100644
--- a/packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
+++ b/packages/nc-gui/components/dlg/share-and-collaborate/ShareBase.vue
@@ -119,11 +119,11 @@ const onRoleToggle = async () => {
isRoleToggleLoading.value = true
try {
- if (sharedBase.value.role === ShareBaseRole.Viewer) {
- await createShareBase(ShareBaseRole.Editor)
- } else {
- await createShareBase(ShareBaseRole.Viewer)
- }
+ // if (sharedBase.value.role === ShareBaseRole.Viewer) {
+ // await createShareBase(ShareBaseRole.Editor)
+ // } else {
+ await createShareBase(ShareBaseRole.Viewer)
+ // }
} catch (e: any) {
message.error(await extractSdkResponseErrorMsg(e))
} finally {
@@ -149,13 +149,13 @@ const onRoleToggle = async () => {
{{ $t('activity.editingAccess') }}
-
+ /> -->
diff --git a/packages/nocodb/src/services/shared-bases.service.ts b/packages/nocodb/src/services/shared-bases.service.ts
index 05eba5fc97..7f892cd25c 100644
--- a/packages/nocodb/src/services/shared-bases.service.ts
+++ b/packages/nocodb/src/services/shared-bases.service.ts
@@ -40,7 +40,7 @@ export class SharedBasesService {
roles = 'viewer';
}
- if (roles === 'editor' && process.env.NC_CLOUD === 'true') {
+ if (roles === 'editor') {
NcError.badRequest('Only viewer role is supported');
}
diff --git a/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts b/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts
index c81c89b908..192e459d8c 100644
--- a/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts
+++ b/packages/nocodb/src/strategies/base-view.strategy/base-view.strategy.ts
@@ -23,8 +23,8 @@ export class BaseViewStrategy extends PassportStrategy(Strategy, 'base-view') {
}
user = {
- roles: extractRolesObj(sharedProject?.roles),
- base_roles: extractRolesObj(sharedProject?.roles),
+ roles: extractRolesObj('viewer'),
+ base_roles: extractRolesObj('viewer'),
};
}