Loading lib/galaxy/managers/jobs.py +4 −8 Original line number Diff line number Diff line Loading @@ -4,10 +4,7 @@ from datetime import ( date, datetime, ) from typing import ( Dict, Optional, ) from typing import Dict import sqlalchemy from boltons.iterutils import remap Loading @@ -34,6 +31,7 @@ from galaxy.exceptions import ( ItemAccessibilityException, ObjectNotFound, RequestParameterInvalidException, RequestParameterMissingException, ) from galaxy.job_metrics import ( RawMetric, Loading Loading @@ -109,9 +107,7 @@ class JobManager: self.app = app self.dataset_manager = DatasetManager(app) def index_query( self, trans: ProvidesUserContext, payload: JobIndexQueryPayload ) -> Optional[sqlalchemy.engine.Result]: def index_query(self, trans: ProvidesUserContext, payload: JobIndexQueryPayload) -> sqlalchemy.engine.Result: """The caller is responsible for security checks on the resulting job if history_id, invocation_id, or implicit_collection_jobs_id is set. Otherwise this will only return the user's jobs or all jobs if the requesting Loading Loading @@ -220,7 +216,7 @@ class JobManager: elif trans.galaxy_session: stmt = stmt.where(Job.session_id == trans.galaxy_session.id) else: return None raise RequestParameterMissingException("A session is required to list jobs for anonymous users") stmt = build_and_apply_filters(stmt, payload.states, lambda s: model.Job.state == s) stmt = build_and_apply_filters(stmt, payload.tool_ids, lambda t: model.Job.tool_id == t) Loading lib/galaxy/webapps/galaxy/services/jobs.py +0 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ class JobsService(ServiceBase): ) jobs = self.job_manager.index_query(trans, payload) out: List[Dict[str, Any]] = [] if jobs is None: return out for job in jobs.yield_per(model.YIELD_PER_ROWS): # TODO: optimize if this crucial if check_security_of_jobs and not security_check(trans, job.history, check_accessible=True): Loading Loading
lib/galaxy/managers/jobs.py +4 −8 Original line number Diff line number Diff line Loading @@ -4,10 +4,7 @@ from datetime import ( date, datetime, ) from typing import ( Dict, Optional, ) from typing import Dict import sqlalchemy from boltons.iterutils import remap Loading @@ -34,6 +31,7 @@ from galaxy.exceptions import ( ItemAccessibilityException, ObjectNotFound, RequestParameterInvalidException, RequestParameterMissingException, ) from galaxy.job_metrics import ( RawMetric, Loading Loading @@ -109,9 +107,7 @@ class JobManager: self.app = app self.dataset_manager = DatasetManager(app) def index_query( self, trans: ProvidesUserContext, payload: JobIndexQueryPayload ) -> Optional[sqlalchemy.engine.Result]: def index_query(self, trans: ProvidesUserContext, payload: JobIndexQueryPayload) -> sqlalchemy.engine.Result: """The caller is responsible for security checks on the resulting job if history_id, invocation_id, or implicit_collection_jobs_id is set. Otherwise this will only return the user's jobs or all jobs if the requesting Loading Loading @@ -220,7 +216,7 @@ class JobManager: elif trans.galaxy_session: stmt = stmt.where(Job.session_id == trans.galaxy_session.id) else: return None raise RequestParameterMissingException("A session is required to list jobs for anonymous users") stmt = build_and_apply_filters(stmt, payload.states, lambda s: model.Job.state == s) stmt = build_and_apply_filters(stmt, payload.tool_ids, lambda t: model.Job.tool_id == t) Loading
lib/galaxy/webapps/galaxy/services/jobs.py +0 −2 Original line number Diff line number Diff line Loading @@ -82,8 +82,6 @@ class JobsService(ServiceBase): ) jobs = self.job_manager.index_query(trans, payload) out: List[Dict[str, Any]] = [] if jobs is None: return out for job in jobs.yield_per(model.YIELD_PER_ROWS): # TODO: optimize if this crucial if check_security_of_jobs and not security_check(trans, job.history, check_accessible=True): Loading