Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor: convert plugin permission if/elif to match/case (#30001) (#35140)
aether711fe6ba2ce4
diff --git a/api/controllers/console/workspace/__init__.py b/api/controllers/console/workspace/__init__.pyindex 60f712e4768..59dd29fdace 100644--- a/api/controllers/console/workspace/__init__.py+++ b/api/controllers/console/workspace/__init__.py@@ -35,22 +35,24 @@ def plugin_permission_required(return view(*args, **kwargs)if install_required:- if permission.install_permission == TenantPluginPermission.InstallPermission.NOBODY:- raise Forbidden()- if permission.install_permission == TenantPluginPermission.InstallPermission.ADMINS:- if not user.is_admin_or_owner:+ match permission.install_permission:+ case TenantPluginPermission.InstallPermission.NOBODY:raise Forbidden()- if permission.install_permission == TenantPluginPermission.InstallPermission.EVERYONE:- pass+ case TenantPluginPermission.InstallPermission.ADMINS:+ if not user.is_admin_or_owner:+ raise Forbidden()+ case TenantPluginPermission.InstallPermission.EVERYONE:+ passif debug_required:- if permission.debug_permission == TenantPluginPermission.DebugPermission.NOBODY:- raise Forbidden()- if permission.debug_permission == TenantPluginPermission.DebugPermission.ADMINS:- if not user.is_admin_or_owner:+ match permission.debug_permission:+ case TenantPluginPermission.DebugPermission.NOBODY:raise Forbidden()- if permission.debug_permission == TenantPluginPermission.DebugPermission.EVERYONE:- pass+ case TenantPluginPermission.DebugPermission.ADMINS:+ if not user.is_admin_or_owner:+ raise Forbidden()+ case TenantPluginPermission.DebugPermission.EVERYONE:+ passreturn view(*args, **kwargs)