mirror of
https://github.com/langgenius/dify.git
synced 2026-04-28 11:56:55 +08:00
Merge branch 'fix/enterprise-api-error-handling' into deploy/enterprise
This commit is contained in:
commit
4e35fbbff4
@ -361,11 +361,14 @@ class FeatureService:
|
|||||||
)
|
)
|
||||||
features.webapp_auth.sso_config.protocol = enterprise_info.get("SSOEnforcedForWebProtocol", "")
|
features.webapp_auth.sso_config.protocol = enterprise_info.get("SSOEnforcedForWebProtocol", "")
|
||||||
|
|
||||||
if is_authenticated and (license_info := enterprise_info.get("License")):
|
# License status and expiry are always exposed so the login page can
|
||||||
|
# show the expiry UI after a force-logout (the user is unauthenticated
|
||||||
|
# at that point). Workspace usage details remain auth-gated.
|
||||||
|
if license_info := enterprise_info.get("License"):
|
||||||
features.license.status = LicenseStatus(license_info.get("status", LicenseStatus.INACTIVE))
|
features.license.status = LicenseStatus(license_info.get("status", LicenseStatus.INACTIVE))
|
||||||
features.license.expired_at = license_info.get("expiredAt", "")
|
features.license.expired_at = license_info.get("expiredAt", "")
|
||||||
|
|
||||||
if workspaces_info := license_info.get("workspaces"):
|
if is_authenticated and (workspaces_info := license_info.get("workspaces")):
|
||||||
features.license.workspaces.enabled = workspaces_info.get("enabled", False)
|
features.license.workspaces.enabled = workspaces_info.get("enabled", False)
|
||||||
features.license.workspaces.limit = workspaces_info.get("limit", 0)
|
features.license.workspaces.limit = workspaces_info.get("limit", 0)
|
||||||
features.license.workspaces.size = workspaces_info.get("used", 0)
|
features.license.workspaces.size = workspaces_info.get("used", 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user