feat: web sso (#7135)

This commit is contained in:
Joe
2024-08-25 18:47:02 +08:00
committed by GitHub
parent 556f4ad5df
commit 741c548f3c
4 changed files with 27 additions and 13 deletions

View File

@@ -6,3 +6,7 @@ class EnterpriseService:
@classmethod
def get_info(cls):
return EnterpriseRequest.send_request('GET', '/info')
@classmethod
def get_app_web_sso_enabled(cls, app_code):
return EnterpriseRequest.send_request('GET', f'/app-sso-setting?appCode={app_code}')

View File

@@ -41,7 +41,7 @@ class SystemFeatureModel(BaseModel):
sso_enforced_for_signin_protocol: str = ''
sso_enforced_for_web: bool = False
sso_enforced_for_web_protocol: str = ''
enable_web_sso_switch_component: bool = False
class FeatureService:
@@ -61,6 +61,7 @@ class FeatureService:
system_features = SystemFeatureModel()
if dify_config.ENTERPRISE_ENABLED:
system_features.enable_web_sso_switch_component = True
cls._fulfill_params_from_enterprise(system_features)
return system_features