Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

549 B
Raw Blame
import type { ToolWithProvider } from '../../types'
import type { ToolNodeType } from './types'
import { CollectionType } from '@/app/components/tools/types'

type ToolAuthorizationCollection = Pick<ToolWithProvider, 'allow_delete' | 'is_team_authorization'>

export const isToolAuthorizationRequired = (
  providerType: ToolNodeType['provider_type'],
  collection?: ToolAuthorizationCollection,
) => {
  return (
    providerType === CollectionType.builtIn &&
    !!collection?.allow_delete &&
    collection?.is_team_authorization === false
  )
}