2024-10-21 09:23:20 +08:00
|
|
|
export enum SSOProtocol {
|
|
|
|
SAML = 'saml',
|
|
|
|
OIDC = 'oidc',
|
|
|
|
OAuth2 = 'oauth2',
|
|
|
|
}
|
|
|
|
|
2024-11-15 17:59:48 +08:00
|
|
|
export enum LicenseStatus {
|
|
|
|
NONE = 'none',
|
|
|
|
INACTIVE = 'inactive',
|
|
|
|
ACTIVE = 'active',
|
|
|
|
EXPIRING = 'expiring',
|
|
|
|
EXPIRED = 'expired',
|
|
|
|
LOST = 'lost',
|
|
|
|
}
|
|
|
|
|
|
|
|
type License = {
|
|
|
|
status: LicenseStatus
|
|
|
|
expired_at: string | null
|
|
|
|
}
|
|
|
|
|
2024-05-15 16:14:49 +08:00
|
|
|
export type SystemFeatures = {
|
|
|
|
sso_enforced_for_signin: boolean
|
2024-10-21 09:23:20 +08:00
|
|
|
sso_enforced_for_signin_protocol: SSOProtocol | ''
|
2024-05-15 16:14:49 +08:00
|
|
|
sso_enforced_for_web: boolean
|
2024-10-21 09:23:20 +08:00
|
|
|
sso_enforced_for_web_protocol: SSOProtocol | ''
|
2024-08-25 18:47:16 +08:00
|
|
|
enable_web_sso_switch_component: boolean
|
2024-10-21 09:23:20 +08:00
|
|
|
enable_email_code_login: boolean
|
|
|
|
enable_email_password_login: boolean
|
|
|
|
enable_social_oauth_login: boolean
|
|
|
|
is_allow_create_workspace: boolean
|
|
|
|
is_allow_register: boolean
|
2024-11-15 17:59:48 +08:00
|
|
|
license: License
|
2024-05-15 16:14:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
export const defaultSystemFeatures: SystemFeatures = {
|
|
|
|
sso_enforced_for_signin: false,
|
|
|
|
sso_enforced_for_signin_protocol: '',
|
|
|
|
sso_enforced_for_web: false,
|
|
|
|
sso_enforced_for_web_protocol: '',
|
2024-08-25 18:47:16 +08:00
|
|
|
enable_web_sso_switch_component: false,
|
2024-10-21 09:23:20 +08:00
|
|
|
enable_email_code_login: false,
|
|
|
|
enable_email_password_login: false,
|
|
|
|
enable_social_oauth_login: false,
|
|
|
|
is_allow_create_workspace: false,
|
|
|
|
is_allow_register: false,
|
2024-11-15 17:59:48 +08:00
|
|
|
license: {
|
|
|
|
status: LicenseStatus.NONE,
|
|
|
|
expired_at: '',
|
|
|
|
},
|
2024-05-15 16:14:49 +08:00
|
|
|
}
|