Skip to content

Conversation

@tcnichol
Copy link
Contributor

For this pull request, the following has been implemented.

If a dataset is public, all users can view the dataset, the files, and the metadata.

A few things I might want to change:

In the route authorization.get_dataset_role, the response type is AuthorizationDB instead of just RoleType (which is the return type for similar methods for file, metadata, etc have.) So for the .get_dataset_role method I create an AuthorizationDB with RoleType 'Viewer' and return that if the dataset is public and the user has no role.

If anybody thinks it would be a better approach, I could change the response type of the .get_dataset_role method to RoleType. That seems like it might make more sense, but I wasn't sure if having the actual authorizationDB object was important anywhere else.

I have also not figured out a solution for allowing users to view public datasets when not logged in. Thought it would be good to handle this, get some feedback, and then move forward.

@tcnichol tcnichol requested a review from longshuicy April 24, 2023 21:42
@tcnichol tcnichol linked an issue Apr 24, 2023 that may be closed by this pull request
@tcnichol tcnichol self-assigned this Apr 24, 2023
@tcnichol tcnichol added the backend Backend specific (Python) label Apr 24, 2023
@tcnichol tcnichol added this to the Sprint April 28 2023 milestone Apr 24, 2023
@tcnichol tcnichol marked this pull request as ready for review April 25, 2023 19:51
@tcnichol
Copy link
Contributor Author

This one is ready for review.
You can change a dataset to 'public' and all logged in viewers can see a public dataset, the files and metadata.
Right now these are not visible if not logged in, and 'published' status exists but has no affect yet. Those will be later issues.

@longshuicy
Copy link
Member

Based on yesterday's discussion, there seems to be more refactoring needed for this? @tcnichol

@tcnichol
Copy link
Contributor Author

@longshuicy

Yes. I'm going to try add new dependencies so that the public datasets will be visible when you are not logged in. So I'll keep working on this one.

I will also change this to draft.

anonymous user is here. not sure if this is a good solution.
@lmarini lmarini added this to the Beta 2 milestone Sep 26, 2023
# Conflicts:
#	backend/app/models/datasets.py
#	backend/app/routers/files.py
#	backend/app/routers/metadata_files.py
#	frontend/src/components/datasets/Dataset.tsx
#	frontend/src/components/datasets/OtherMenu.tsx
we can change status, new status reflected on other users explore pages
@tcnichol tcnichol requested review from lmarini and max-zilla October 12, 2023 14:17
Copy link
Member

@lmarini lmarini left a comment

Choose a reason for hiding this comment

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

Overall looks good to me. A couple of proposed changes:

  • When a dataset is public and a user has access to it, they can execute an extractor. I am not sure we want to let them do this. We could disable/hide the button or maybe remove the extract tab all together?
  • I don't think the "Published" option does anything right now. We should deleted from the list of options.

@lmarini
Copy link
Member

lmarini commented Oct 31, 2023

@tcnichol can fix conflicts? Have you been able to address to the two small changes above? Thanks!

# Conflicts:
#	frontend/src/components/metadata/widgets/MetadataSelect.tsx
@tcnichol
Copy link
Contributor Author

tcnichol commented Nov 1, 2023

@tcnichol can fix conflicts? Have you been able to address to the two small changes above? Thanks!

I'll be taking care of that this afternoon.

@tcnichol
Copy link
Contributor Author

tcnichol commented Nov 1, 2023

Pushed new commits, issues should be resolved and merge conflict fixed.

@tcnichol tcnichol changed the title 464 public datasets visible to all users 464 public datasets visible to logged in users Nov 6, 2023
@tcnichol tcnichol changed the title 464 public datasets visible to logged in users 464 datasets visible to logged in users with AUTHENTICATED status Nov 6, 2023
@tcnichol
Copy link
Contributor Author

tcnichol commented Nov 7, 2023

The status is now changed to AUTHENTICATED. The difference will be
AUTHENTICATED means any logged in user can view a dataset, but not someone who is not logged in. PUBLIC datasets can be seen whether you are logged in or not. A separate pull request will implement PUBLIC datasets.

@max-zilla max-zilla requested a review from lmarini November 9, 2023 15:05
with other popups and renamed to Update.
Copy link
Member

@lmarini lmarini left a comment

Choose a reason for hiding this comment

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

@tcnichol still works well after changes to label. I made one small change. I moved the submission button to bottom dialog actions in line with other popups and renamed to Update. Please take a look so we are consistent on all popups. Thank you.

@tcnichol tcnichol modified the milestones: v2.0-beta-2, v2.0 Nov 16, 2023
@lmarini lmarini merged commit 9c64e8b into main Nov 17, 2023
@lmarini lmarini deleted the 464-public-datasets branch November 17, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend specific (Python)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

back end public access Public datasets

5 participants