From b2266a6bbc8b0a23788282f4f7d4823a14655e53 Mon Sep 17 00:00:00 2001 From: jozh2008 Date: Wed, 29 Nov 2023 13:01:01 +0100 Subject: [PATCH 1/3] set require_admin from True to false in tool_data for show and index --- lib/galaxy/webapps/galaxy/api/tool_data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/tool_data.py b/lib/galaxy/webapps/galaxy/api/tool_data.py index 8812368595e..79f6695cdf6 100644 --- a/lib/galaxy/webapps/galaxy/api/tool_data.py +++ b/lib/galaxy/webapps/galaxy/api/tool_data.py @@ -54,7 +54,7 @@ class FastAPIToolData: "/api/tool_data", summary="Lists all available data tables", response_description="A list with details on individual data tables.", - require_admin=True, + require_admin=False, ) async def index(self) -> ToolDataEntryList: """Get the list of all available data tables.""" @@ -77,7 +77,7 @@ class FastAPIToolData: "/api/tool_data/{table_name}", summary="Get details of a given data table", response_description="A description of the given data table and its content", - require_admin=True, + require_admin=False, ) async def show(self, table_name: str = ToolDataTableName) -> ToolDataDetails: """Get details of a given tool data table.""" From 3a2938198f1a2ade11322014d73c464b3543a622 Mon Sep 17 00:00:00 2001 From: jozh2008 Date: Mon, 11 Dec 2023 13:29:01 +0100 Subject: [PATCH 2/3] set require_admin to false in tool_data --- lib/galaxy/webapps/galaxy/api/tool_data.py | 2 +- lib/galaxy_test/api/test_tool_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/api/tool_data.py b/lib/galaxy/webapps/galaxy/api/tool_data.py index 79f6695cdf6..95b8c1f4728 100644 --- a/lib/galaxy/webapps/galaxy/api/tool_data.py +++ b/lib/galaxy/webapps/galaxy/api/tool_data.py @@ -77,7 +77,7 @@ class FastAPIToolData: "/api/tool_data/{table_name}", summary="Get details of a given data table", response_description="A description of the given data table and its content", - require_admin=False, + require_admin=True, ) async def show(self, table_name: str = ToolDataTableName) -> ToolDataDetails: """Get details of a given tool data table.""" diff --git a/lib/galaxy_test/api/test_tool_data.py b/lib/galaxy_test/api/test_tool_data.py index 216f083091c..77174072a6d 100644 --- a/lib/galaxy_test/api/test_tool_data.py +++ b/lib/galaxy_test/api/test_tool_data.py @@ -14,7 +14,7 @@ from ._framework import ApiTestCase class TestToolDataApi(ApiTestCase): def test_admin_only(self): index_response = self._get("tool_data", admin=False) - self._assert_status_code_is(index_response, 403) + self._assert_status_code_is(index_response, 200) def test_list(self): index_response = self._get("tool_data", admin=True) From cf0c0afa3ee7fc2b687f604db1a0b87b2e37aaa2 Mon Sep 17 00:00:00 2001 From: jozh2008 Date: Mon, 11 Dec 2023 15:41:10 +0100 Subject: [PATCH 3/3] run make update-client-api-schema, request in pull_request --- client/src/api/schema/schema.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index bd06205258e..d4e12defe4a 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -18173,12 +18173,6 @@ export interface operations { * Lists all available data tables * @description Get the list of all available data tables. */ - parameters?: { - /** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */ - header?: { - "run-as"?: string; - }; - }; responses: { /** @description A list with details on individual data tables. */ 200: { @@ -18186,12 +18180,6 @@ export interface operations { "application/json": components["schemas"]["ToolDataEntryList"]; }; }; - /** @description Validation Error */ - 422: { - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; }; }; create_api_tool_data_post: {