mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
1f87676d52
Some checks are pending
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions
Co-authored-by: Garfield Dai <dai.hai@foxmail.com>
51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
export enum SSOProtocol {
|
|
SAML = 'saml',
|
|
OIDC = 'oidc',
|
|
OAuth2 = 'oauth2',
|
|
}
|
|
|
|
export enum LicenseStatus {
|
|
NONE = 'none',
|
|
INACTIVE = 'inactive',
|
|
ACTIVE = 'active',
|
|
EXPIRING = 'expiring',
|
|
EXPIRED = 'expired',
|
|
LOST = 'lost',
|
|
}
|
|
|
|
type License = {
|
|
status: LicenseStatus
|
|
expired_at: string | null
|
|
}
|
|
|
|
export type SystemFeatures = {
|
|
sso_enforced_for_signin: boolean
|
|
sso_enforced_for_signin_protocol: SSOProtocol | ''
|
|
sso_enforced_for_web: boolean
|
|
sso_enforced_for_web_protocol: SSOProtocol | ''
|
|
enable_web_sso_switch_component: boolean
|
|
enable_email_code_login: boolean
|
|
enable_email_password_login: boolean
|
|
enable_social_oauth_login: boolean
|
|
is_allow_create_workspace: boolean
|
|
is_allow_register: boolean
|
|
license: License
|
|
}
|
|
|
|
export const defaultSystemFeatures: SystemFeatures = {
|
|
sso_enforced_for_signin: false,
|
|
sso_enforced_for_signin_protocol: '',
|
|
sso_enforced_for_web: false,
|
|
sso_enforced_for_web_protocol: '',
|
|
enable_web_sso_switch_component: false,
|
|
enable_email_code_login: false,
|
|
enable_email_password_login: false,
|
|
enable_social_oauth_login: false,
|
|
is_allow_create_workspace: false,
|
|
is_allow_register: false,
|
|
license: {
|
|
status: LicenseStatus.NONE,
|
|
expired_at: '',
|
|
},
|
|
}
|