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.

439 B
Raw Blame
import type { TagType } from '@dify/contracts/api/console/tags/types.gen'
import type { PermissionKey } from '@/models/access-control'
import { SnippetPermission } from '@/app/components/snippets/utils/permission'

export const getTagManagePermissionKey = (type: TagType): PermissionKey => {
  if (type === 'app') return 'app.tag.manage'

  if (type === 'snippet') return SnippetPermission.CreateAndModify

  return 'dataset.tag.manage'
}