mirror of
https://github.com/langgenius/dify.git
synced 2026-06-20 17:21:06 +08:00
Co-authored-by: zhangx1n <zhangxin@dify.ai> Co-authored-by: yyh <yuanyouhuilyz@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
35 lines
865 B
TypeScript
35 lines
865 B
TypeScript
export const SubjectType = {
|
|
GROUP: 'group',
|
|
ACCOUNT: 'account',
|
|
} as const
|
|
|
|
export type SubjectType = typeof SubjectType[keyof typeof SubjectType]
|
|
|
|
export const AccessMode = {
|
|
PUBLIC: 'public',
|
|
SPECIFIC_GROUPS_MEMBERS: 'private',
|
|
ORGANIZATION: 'private_all',
|
|
EXTERNAL_MEMBERS: 'sso_verified',
|
|
} as const
|
|
|
|
export type AccessMode = typeof AccessMode[keyof typeof AccessMode]
|
|
|
|
export type AccessControlGroup = {
|
|
id: string
|
|
name: string
|
|
groupSize: number
|
|
}
|
|
|
|
export type AccessControlAccount = {
|
|
id: string
|
|
name: string
|
|
email: string
|
|
avatar: string
|
|
avatarUrl: string
|
|
}
|
|
|
|
export type SubjectGroup = { subjectId: string, subjectType: SubjectType, groupData: AccessControlGroup }
|
|
export type SubjectAccount = { subjectId: string, subjectType: SubjectType, accountData: AccessControlAccount }
|
|
|
|
export type Subject = SubjectGroup | SubjectAccount
|