Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't require admin user to list /api/tool_data #17161

Merged
merged 4 commits into from
Dec 11, 2023
Merged

Conversation

jozh2008
Copy link
Contributor

To use bioblend.galaxy.tool_data.get_data_tables(), I changed require_admin from Tru to False in tool_data.py for index.
Without this change I got the following error.

  • bioblend.ConnectionError: GET: Error 403: b'{"err_msg": "You must be an administrator to access this function.", "err_code":403006}', 0 attempts left: {"err_msg": "You must be an administrator to access this function.", "err_code":403006}

Additionally, I changed the self.assert_status_code_is(index_reponse,200) in the test_admin_only function in test_tool_data.py, because now you don't have to be an admin to use index.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 23.2 milestone Dec 11, 2023
@mvdbeek mvdbeek changed the title set require_admin from True to false in tool_data for index Don't require admin user to list /api/tool_data Dec 11, 2023
@mvdbeek mvdbeek changed the title Don't require admin user to list /api/tool_data Don't require admin user to list /api/tool_data Dec 11, 2023
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks good!

@nsoranzo

This comment was marked as resolved.

@tuncK
Copy link
Contributor

tuncK commented Dec 11, 2023

Hi @jozh2008, thanks a lot for the speed.

Question: were you not originally suggesting we should relax the admin requirement on some other read-only functions? Such as:



Or am I confusing things? (If so, you might need to again change the corresponding tests).

@nsoranzo
Copy link
Member

@jozh2008 This is ready for merging, so let us know if you prefer to address @tuncK's suggestion here or in a separate PR.

@mvdbeek
Copy link
Member

mvdbeek commented Dec 11, 2023

I could see a reason for those being private, that'll need additional review, so I'm going to merge this one now.

@mvdbeek mvdbeek merged commit a43bbf8 into galaxyproject:dev Dec 11, 2023
49 of 51 checks passed
@jozh2008
Copy link
Contributor Author

Thank you, I will do a separate PR.

@mvdbeek mvdbeek modified the milestones: 23.2, 24.0 Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants