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.

373 B
Raw Blame
import type { RbacRole } from '@dify/contracts/api/console/workspaces/types.gen'

export const isWorkspaceAdminRole = (role: RbacRole): boolean => {
  if (role.type !== 'workspace') return false

  return (
    role.role_tag === 'admin' ||
    (role.is_builtin === true &&
      role.category === 'global_system_default' &&
      role.name.toLowerCase() === 'admin')
  )
}