feat: add webapp copyright feature

This commit is contained in:
GareArc 2025-03-18 03:53:07 -04:00
parent c794ecf101
commit 31086a1fbf
1 changed files with 7 additions and 0 deletions

View File

@ -55,6 +55,7 @@ class FeatureModel(BaseModel):
can_replace_logo: bool = False
model_load_balancing_enabled: bool = False
dataset_operator_enabled: bool = False
webapp_copyright_enabled: bool = False
# pydantic configs
model_config = ConfigDict(protected_namespaces=())
@ -86,6 +87,9 @@ class FeatureService:
if dify_config.BILLING_ENABLED and tenant_id:
cls._fulfill_params_from_billing_api(features, tenant_id)
if dify_config.ENTERPRISE_ENABLED:
features.webapp_copyright_enabled = True
return features
@classmethod
@ -123,6 +127,9 @@ class FeatureService:
features.billing.subscription.plan = billing_info["subscription"]["plan"]
features.billing.subscription.interval = billing_info["subscription"]["interval"]
if features.billing.subscription.plan != "sandbox":
features.webapp_copyright_enabled = True
if "members" in billing_info:
features.members.size = billing_info["members"]["size"]
features.members.limit = billing_info["members"]["limit"]