Browse Source

fix(nc-gui): allow editor to read integration list

pull/9921/head
Ramesh Mane 1 month ago
parent
commit
5b8336814d
  1. 4
      packages/nc-gui/composables/useNocoAi.ts
  2. 1
      packages/nocodb/src/utils/acl.ts

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

@ -5,6 +5,8 @@ const aiIntegrationNotFound = 'AI integration not found'
export const useNocoAi = createSharedComposable(() => {
const { $api } = useNuxtApp()
const { isUIAllowed } = useRoles()
const workspaceStore = useWorkspace()
const { activeWorkspaceId } = storeToRefs(workspaceStore)
@ -339,6 +341,8 @@ export const useNocoAi = createSharedComposable(() => {
}
const loadAiIntegrations = async () => {
if (!isUIAllowed('dataEdit')) return
aiIntegrations.value = (await listIntegrationByType(IntegrationsType.Ai)) || []
if (aiIntegrations.value.length) {

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

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

Loading…
Cancel
Save