Skip to content

Commit

Permalink
Merge pull request #17161 from jozh2008/dev
Browse files Browse the repository at this point in the history
Don't require admin user to list ``/api/tool_data``
  • Loading branch information
mvdbeek authored Dec 11, 2023
2 parents 224859e + cf0c0af commit a43bbf8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18264,25 +18264,13 @@ 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: {
content: {
"application/json": components["schemas"]["ToolDataEntryList"];
};
};
/** @description Validation Error */
422: {
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
create_api_tool_data_post: {
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/tool_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy_test/api/test_tool_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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)
Expand Down

0 comments on commit a43bbf8

Please sign in to comment.