mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-14 20:41:21 +08:00
81dbfd6748
# Conflicts: # README.md # api/.env.example # api/controllers/console/__init__.py # api/controllers/console/apikey.py # api/controllers/console/explore/completion.py # api/controllers/console/explore/workflow.py # api/controllers/service_api/app/workflow.py # api/controllers/service_api/wraps.py # api/controllers/web/workflow.py # api/core/model_runtime/model_providers/bedrock/get_bedrock_client.py # api/core/model_runtime/model_providers/bedrock/llm/llm.py # api/core/model_runtime/model_providers/openai_api_compatible/openai_api_compatible.yaml # api/core/model_runtime/model_providers/openai_api_compatible/text_embedding/text_embedding.py # api/models/model.py # api/poetry.lock # api/pyproject.toml # web/.env.example # web/Dockerfile # web/app/(commonLayout)/app/(appDetailLayout)/[appId]/layout.tsx # web/app/components/app/overview/appCard.tsx # web/app/components/base/chat/chat-with-history/chat-wrapper.tsx # web/app/components/base/chat/embedded-chatbot/index.tsx # web/app/components/base/mermaid/index.tsx # web/app/components/develop/index.tsx # web/app/components/develop/secret-key/secret-key-modal.tsx # web/app/components/explore/app-list/index.tsx # web/app/components/explore/item-operation/index.tsx # web/app/components/explore/sidebar/app-nav-item/index.tsx # web/app/components/explore/sidebar/index.tsx # web/app/components/header/account-setting/index.tsx # web/app/components/header/index.tsx # web/app/components/share/text-generation/index.tsx # web/app/components/tools/provider/detail.tsx # web/app/layout.tsx # web/package.json # web/service/base.ts # web/yarn.lock
63 lines
1.8 KiB
TypeScript
63 lines
1.8 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_marketplace: 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
|
|
is_email_setup: boolean
|
|
license: License
|
|
is_custom_auth2: string // extend: Customizing AUTH2
|
|
ding_talk_client_id: string // Extend: DingTalk third-party login
|
|
ding_talk_corp_id: string // Extend: DingTalk sidebar login
|
|
ding_talk: boolean // Extend: switch DingTalk sidebar login
|
|
}
|
|
|
|
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_marketplace: 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,
|
|
is_email_setup: false,
|
|
license: {
|
|
status: LicenseStatus.NONE,
|
|
expired_at: '',
|
|
},
|
|
is_custom_auth2: '', // extend: Customizing AUTH2
|
|
ding_talk_client_id: '', // Extend: DingTalk third-party login
|
|
ding_talk_corp_id: '', // Extend: DingTalk sidebar login
|
|
ding_talk: false, // Extend: switch DingTalk sidebar login
|
|
}
|