diff --git a/nvflare/private/fed/server/job_cmds.py b/nvflare/private/fed/server/job_cmds.py index 23970579f0..8442cee8c1 100644 --- a/nvflare/private/fed/server/job_cmds.py +++ b/nvflare/private/fed/server/job_cmds.py @@ -171,11 +171,10 @@ def get_spec(self): client_cmd=ftd.PULL_BINARY_FQN, ), CommandSpec( - name=AdminCommandNames.DOWNLOAD_JOB_COMPONENT, - description="download a specified component for a specified job", - usage=f"{AdminCommandNames.DOWNLOAD_JOB_COMPONENT} job_id component_name", - handler_func=self.download_job_component, - authz_func=self.authorize_job_component, + name=AdminCommandNames.DOWNLOAD_JOB_COMPONENTS, + description="download additional components for a specified job", + usage=f"{AdminCommandNames.DOWNLOAD_JOB_COMPONENTS} job_id", + handler_func=self.download_job_components, client_cmd=ftd.PULL_FOLDER_FQN, ), CommandSpec( @@ -244,20 +243,6 @@ def authorize_job(self, conn: Connection, args: List[str]): return PreAuthzReturnCode.REQUIRE_AUTHZ - def authorize_job_component(self, conn: Connection, args: List[str]): - self.logger.error(f"authorize_job_component called for {args}") - rc = self.authorize_job_id(conn, args) - if rc == PreAuthzReturnCode.ERROR: - return rc - - if len(args) > 2: - err = self.validate_command_targets(conn, args[2:]) - if err: - conn.append_error(err, meta=make_meta(MetaStatusValue.INVALID_TARGET, err)) - return PreAuthzReturnCode.ERROR - - return PreAuthzReturnCode.REQUIRE_AUTHZ - def _start_app_on_clients(self, conn: Connection, job_id: str) -> bool: engine = conn.app_ctx client_names = conn.get_prop(self.TARGET_CLIENT_NAMES, None)