mirror of
https://github.com/langgenius/dify.git
synced 2026-08-29 19:54:46 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Wu Tianwei <30284043+WTW0313@users.noreply.github.com> Co-authored-by: twwu <twwu@dify.ai>
20 lines
626 B
TypeScript
20 lines
626 B
TypeScript
/**
|
|
* Shared permission levels for resources (datasets, credentials, etc.).
|
|
* Mirrors PermissionEnum from api/models/enums.py.
|
|
*/
|
|
export const PermissionLevel = {
|
|
onlyMe: 'only_me',
|
|
allTeamMembers: 'all_team_members',
|
|
partialMembers: 'partial_members',
|
|
} as const
|
|
|
|
export type PermissionLevel = (typeof PermissionLevel)[keyof typeof PermissionLevel]
|
|
|
|
/**
|
|
* Subset of PermissionLevel accepted for plugin credentials — partial_members
|
|
* is not supported for OAuth/API-key credentials on the backend.
|
|
*/
|
|
export type CredentialPermission =
|
|
| typeof PermissionLevel.onlyMe
|
|
| typeof PermissionLevel.allTeamMembers
|