feat(quota): implement workspace-level quota enforcement and statistics
- Refactor quota management logic to support usage checks scoped by workspace. - Update quota statistics API to return granular quota details for each workspace. - Revise default configuration settings for terminal user and model limits. - Remove quota check decorators from the model controller.
This commit is contained in:
@@ -1286,7 +1286,7 @@ async def import_app(
|
||||
# 仅新建应用时检查配额,覆盖已有应用时跳过
|
||||
if target_app_id is None:
|
||||
from app.core.quota_manager import _check_quota
|
||||
_check_quota(db, current_user.tenant_id, "app_quota", "app")
|
||||
_check_quota(db, current_user.tenant_id, "app_quota", "app", workspace_id=current_user.current_workspace_id)
|
||||
result_app, warnings = AppDslService(db).import_dsl(
|
||||
dsl=dsl,
|
||||
workspace_id=current_user.current_workspace_id,
|
||||
|
||||
Reference in New Issue
Block a user