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.

706 B
Raw Blame
'use client'

import { useTranslation } from 'react-i18next'
import PermissionPicker from './permission-picker'

type PermissionFieldProps = {
  value: string[]
  onChange: (next: string[]) => void
  readonly?: boolean
}

const PermissionField = ({ value, onChange, readonly = false }: PermissionFieldProps) => {
  const { t } = useTranslation(['permission'])

  return (
    <div className="flex min-h-0 flex-1 flex-col gap-2">
      <div className="system-sm-medium text-text-secondary">
        {t(($) => $['permissionSet.permissions'], { ns: 'permission' })}
      </div>
      <PermissionPicker value={value} onChange={onChange} readonly={readonly} />
    </div>
  )
}

export default PermissionField