Browse Source

fix(nc-gui): revert get integration related changes

pull/9921/head
Ramesh Mane 1 month ago
parent
commit
27ac7eb5c0
  1. 2
      packages/nc-gui/composables/useNocoAi.ts
  2. 11
      packages/nocodb/src/controllers/integrations.controller.ts
  3. 1
      packages/nocodb/src/utils/acl.ts

2
packages/nc-gui/composables/useNocoAi.ts

@ -5,8 +5,6 @@ const aiIntegrationNotFound = 'AI integration not found'
export const useNocoAi = createSharedComposable(() => {
const { $api } = useNuxtApp()
const { isUIAllowed } = useRoles()
const workspaceStore = useWorkspace()
const { activeWorkspaceId } = storeToRefs(workspaceStore)

11
packages/nocodb/src/controllers/integrations.controller.ts

@ -124,15 +124,6 @@ export class IntegrationsController {
@Query('offset') offset?: string,
@Query('query') query?: string,
) {
if (
extractRolesObj(req.user.base_roles)?.editor &&
type !== IntegrationsType.Ai
) {
NcError.forbidden(
`You do not have permission to perform the action "integrationList" with the roles: Editor.`,
);
}
const integrations = await this.integrationsService.integrationList({
req,
includeDatabaseInfo: includeDatabaseInfo === 'true',
@ -143,7 +134,7 @@ export class IntegrationsController {
query,
});
if (!includeDatabaseInfo && !extractRolesObj(req.user.base_roles)?.editor) {
if (!includeDatabaseInfo) {
for (const integration of integrations.list) {
integration.config = undefined;
}

1
packages/nocodb/src/utils/acl.ts

@ -295,7 +295,6 @@ const rolePermissions:
// AI
aiUtils: true,
aiData: true,
org_integrationList: true,
},
},
[ProjectRoles.CREATOR]: {

Loading…
Cancel
Save