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

485 public datasets visible when not logged in #832

Merged
merged 151 commits into from
Jan 29, 2024

Conversation

tcnichol
Copy link
Contributor

@tcnichol tcnichol commented Nov 15, 2023

ready for review now

@tcnichol tcnichol linked an issue Nov 15, 2023 that may be closed by this pull request
@tcnichol tcnichol modified the milestone: v2.0-beta-2 Nov 16, 2023
@tcnichol
Copy link
Contributor Author

How to test this pull request.

Note - the new 'default' page is now the public page. Login and register are in the upper right hand corner.

Create at least 2 Users.

Using User1, create datasets and upload files. Then mark at least one dataset 'public' by changing the status from 'private' to 'public.'

If you log out as that user, then you will see the public datasets. Other users will also see them when logged in. So if User1 made a dataset public, User2 will see it when logged in.

Copy link
Member

@ddey2 ddey2 left a comment

Choose a reason for hiding this comment

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

Looks good. tested

@tcnichol
Copy link
Contributor Author

New instructions for testing.

If you start up a clowder instance, run the populate fake data script. It will generate some public datasets and they should be visible when you are not logged in.

The new default page is the public page, with login and register in the upper right corner.

Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

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

Could we remove those dividers?

image

Download version history doesn't work. i think the url is wrong, instead of public/files you should use public_files in the URL

image image

Download dataset button doesn't work. It's still pointing to the private endpoint.

image image

Download dataset button inside the dataset page doesn't work either. Not sure why

image image

@@ -164,6 +185,11 @@
tags=["elasticsearch"],
dependencies=[Depends(get_current_username)],
)
api_router.include_router(
elasticsearch.router,
Copy link
Member

Choose a reason for hiding this comment

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

@tcnichol did you have a chance to take a look if this route should use the public_elasticsearch.py instead?

frontend/src/actions/public_file.js Outdated Show resolved Hide resolved
frontend/src/actions/public_file.js Outdated Show resolved Hide resolved
frontend/src/actions/public_file.js Show resolved Hide resolved
dataset download fixed
download file and file version fixed
public elasticsearch added to router
@tcnichol
Copy link
Contributor Author

@longshuicy i removed the divider and addressed your comments.
There is one method that i left a comment on - in public_file I modeled the metadata function that gets extracted metadata after the one in actions/file.js. Maybe both should change?

Copy link
Member

@longshuicy longshuicy left a comment

Choose a reason for hiding this comment

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

All the suggestions are resolved now. Approve.
But could you fix the black linting before merging?

black formatting
@tcnichol
Copy link
Contributor Author

tcnichol commented Jan 26, 2024

I'm not sure what is going wrong.

I am running

pipenv run black develop

and i see that it's changing populate_fake_data.py

but when I go to commit it shows nothing.

Same with the backend/app


I deleted my clowder2 local and cloned again and built new environment, now black seems to be formatting right.

@longshuicy longshuicy merged commit d76b2c4 into main Jan 29, 2024
6 checks passed
@longshuicy longshuicy deleted the 485-public-datasets-visible-when-not-logged-in branch January 29, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

public datasets visible when not logged in
4 participants