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

[Bug]: api calls involving in_project only work when logged into TaxonWorks, and source_in_project is only true when logged into TaxonWorks #3623

Closed
rogerburks opened this issue Nov 5, 2023 · 0 comments
Assignees
Labels
bug An existing function is broken. exemplary issue This is a great example of how to write an issue.

Comments

@rogerburks
Copy link

rogerburks commented Nov 5, 2023

Steps to reproduce the bug

1. Perform an api call for a source that is in a particular project, and include the correct `project_token`: https://sfg.taxonworks.org/api/v1/sources?author=Domer&project_token=adhBi59dc13U7RxbgNE5HQ and check `source_in_project` (it should be `true` if you are logged into the UCD project in TaxonWorks).

2. Sign out of https://sfg.taxonworks.org and clear any browser cache or other cache involved.

3. Check `source_in_project` again. If you are currently not logged into the correct project (UCD) at https://sfg.taxonworks.org then `source_in_project` will be `false`. If you are logged into the project, `source_in_project` will be `true`. This and the below patterns are the case for all projects and queries tested.

4. Perform any sources call using `in_project=true`, such as https://sfg.taxonworks.org/api/v1/sources?author=Domer&in_project=true&project_token=adhBi59dc13U7RxbgNE5HQ and if you are not logged into a project in TaxonWorks, there will never be any results returned.

5. Log into the correct project in TaxonWorks and perform the same api call. Results will be returned.

Screenshot

No response

Expected behavior

Calls such as https://sfg.taxonworks.org/api/v1/sources?author=Domer&in_project=true&project_token=adhBi59dc13U7RxbgNE5HQ should work regardless of whether the current user is logged into the project in TaxonWorks.

Additional Screenshots

No response

Environment

Production

Sandbox Used

No response

Version

No response

Browser Used

firefox, chrome, safari

@rogerburks rogerburks added the bug An existing function is broken. label Nov 5, 2023
@rogerburks rogerburks changed the title [Bug]: api calls involving source_in_project and in_project only work when logged into TaxonWorks [Bug]: api calls involving in_project only work when logged into TaxonWorks, and source_in_project is only true when logged into TaxonWorks Nov 5, 2023
@mjy mjy added the exemplary issue This is a great example of how to write an issue. label Nov 7, 2023
@mjy mjy self-assigned this Nov 7, 2023
@mjy mjy closed this as completed in d9780ab Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing function is broken. exemplary issue This is a great example of how to write an issue.
Projects
None yet
Development

No branches or pull requests

2 participants