From bbe73df32979426ecca3e4a566c8ae2a5194ac7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agust=C3=ADn=20D=C3=ADaz?= <49416765+AgustinRamiroDiaz@users.noreply.github.com> Date: Wed, 22 Jan 2025 09:42:07 -0300 Subject: [PATCH] fix: only forbid endpoint, not function (#839) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Agustín Ramiro Díaz --- backend/protocol_rpc/endpoints.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/protocol_rpc/endpoints.py b/backend/protocol_rpc/endpoints.py index e3fa1a7e..8e9619c6 100644 --- a/backend/protocol_rpc/endpoints.py +++ b/backend/protocol_rpc/endpoints.py @@ -148,7 +148,6 @@ def delete_provider(llm_provider_registry: LLMProviderRegistry, id: int) -> None llm_provider_registry.delete(id) -@check_forbidden_method_in_hosted_studio def create_validator( validators_registry: ValidatorsRegistry, accounts_manager: AccountsManager, @@ -743,7 +742,11 @@ def register_all_rpc_endpoints( method_name="sim_deleteProvider", ) register_rpc_endpoint( - partial(create_validator, validators_registry, accounts_manager), + partial( + check_forbidden_method_in_hosted_studio(create_validator), + validators_registry, + accounts_manager, + ), method_name="sim_createValidator", ) register_rpc_endpoint(