feat: Disable the "Forgot your password?" button when the mail server setup is incomplete (#11653)

This commit is contained in:
Shun Miyazawa
2024-12-18 16:20:41 +09:00
committed by GitHub
parent 2961fa0e08
commit f7415e1ca4
4 changed files with 13 additions and 3 deletions

View File

@@ -63,6 +63,7 @@ class SystemFeatureModel(BaseModel):
enable_social_oauth_login: bool = False
is_allow_register: bool = False
is_allow_create_workspace: bool = False
is_email_setup: bool = False
license: LicenseModel = LicenseModel()
@@ -98,6 +99,7 @@ class FeatureService:
system_features.enable_social_oauth_login = dify_config.ENABLE_SOCIAL_OAUTH_LOGIN
system_features.is_allow_register = dify_config.ALLOW_REGISTER
system_features.is_allow_create_workspace = dify_config.ALLOW_CREATE_WORKSPACE
system_features.is_email_setup = dify_config.MAIL_TYPE is not None and dify_config.MAIL_TYPE != ""
@classmethod
def _fulfill_params_from_env(cls, features: FeatureModel):