-
Notifications
You must be signed in to change notification settings - Fork 6
485 public datasets visible when not logged in #832
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
Merged
longshuicy
merged 151 commits into
main
from
485-public-datasets-visible-when-not-logged-in
Jan 29, 2024
Merged
Changes from all commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
a72f9a1
adding new file
tcnichol 5beae5c
modal allows selecting public
tcnichol ac34ea5
changing front end to allow changing to PUBLIC
tcnichol a828fbd
changing to public now works
tcnichol 9467a8f
adding new routes for public datasets
tcnichol a6d6d5a
routers for public files and datasets added
tcnichol 216188c
running codegen for new files
tcnichol 04f3caf
running codegen for new files
tcnichol 261b9ed
does not work right now
tcnichol 93dabd6
small fixes, a few typos
tcnichol f5071c7
working now
longshuicy 156d2d4
new direction if public
tcnichol fa08039
adding PublicDataset
tcnichol 071880e
fixing indents
tcnichol 2290fb5
Merge branch 'main' into 485-public-datasets-visible-when-not-logged-in
tcnichol fe099c4
adding public folders
tcnichol 69141bf
error on folders and details
tcnichol 76a1dda
folders do not show
tcnichol 58c49fe
moving layout to new component
tcnichol ea53a1d
public dataset view uses DatasetLayout now
tcnichol 6e97705
console logs, should remove later
tcnichol 618a5bf
cannot read properties of undefined?
tcnichol 897a8bc
cannot read properties of undefined?
tcnichol 1cc3de0
fix package lock
tcnichol ca8d40a
error gone but with hardcoded limit,not sure why
tcnichol 423f8d9
works now with limit
tcnichol 273812f
this seemed to get rid of the error
tcnichol bd8fe51
public view works, shows only public datasets
tcnichol 801dca0
fixing import, working on publicDataset component now
tcnichol fcd07f1
files table has option for public now, will use different route
tcnichol b4b6a52
publicactions menu added
tcnichol df0b199
new tab panel components
tcnichol 889564f
removing unused components
tcnichol 18092e7
adding public file
tcnichol deffbc2
adding actions and states for public folders
tcnichol b0473b4
fixing package lock
tcnichol 045d210
fixing wrong method called for public dataset details
tcnichol 598b7af
public file - no editing or modifying user metadata
tcnichol f7ff2ab
index now has authenticated and public
tcnichol 1a7cc53
adding public and authenticated to index
tcnichol b25d12e
adding new routes for public search
tcnichol d2db682
adding tests
tcnichol e2c4d44
sort of works
tcnichol 687883d
using a status field rather than 2 booleans since both cannot be true
tcnichol 85a75fc
tests pass for public datasets,
tcnichol 28f4a99
adding public and authenticated to the user clause
tcnichol ab7c6d8
public no longer private router, but problems with layout
tcnichol 3fb1ffd
errors on files, using new publicLayout for later
tcnichol 5a097ea
public file actions
tcnichol 8b3ba92
dataset works, need to fix file
tcnichol 549851d
public file added
tcnichol f80be25
public file page shows up, has error
tcnichol e5da345
something breaks on page, might be related to visualizations
tcnichol abdb225
errors seem to be on visualization dab
tcnichol 88e9923
routes had dependency that was not needed
tcnichol 4342564
public file menu boolean, not all options should appear
tcnichol 282ae31
adding public visualizations
tcnichol 7080e15
public visualization view
tcnichol fa689e7
adding to reducers index, fixing names
tcnichol 54858b2
will need to use another file actions menu
tcnichol f8963c6
removing some unused imports
tcnichol f11a578
deleting the metadata public routers
tcnichol 87f086e
public metadata
tcnichol 4f5c62e
adding metadata
tcnichol 30aed55
fixing public dataset details
tcnichol 492f3a2
no more error on public file
tcnichol a1df3e8
user metadata tab should work now
tcnichol 23fe460
adding method to public_datasets.js for metadata
tcnichol 0ee9ffb
public layout removes links we do not use in this view
tcnichol 180d490
change explore to public
tcnichol 06ff550
some fake data will be public
tcnichol 4ae77f7
fix public metadata extraction tab for file
tcnichol 28465d7
using public layout in public dataset
tcnichol f4a802f
download public file version
tcnichol 0afb0c8
route to download public dataset
tcnichol 9ad113b
HACK ADDED - probably not a good idea
tcnichol 6fbbb73
register or login for public page
tcnichol 4aa308d
adding authenticated status
tcnichol 77b66c7
return public datasets
tcnichol 6696663
have some authenticated datasets as well
tcnichol 20ae2f7
fixing auth for public datasets
tcnichol b708bc9
checking for public dataset files
tcnichol 6bbaf3f
changing auth for public or authenticated things
tcnichol 402373f
adding filestatus for easier checks
tcnichol 9187203
changing status of files?
tcnichol 3bfb268
adding has public access method
tcnichol 9c3ae63
new method
tcnichol f219557
Merge branch 'main' into 485-public-datasets-visible-when-not-logged-in
tcnichol 3690a40
adding public as well as authenticated
tcnichol 9ee304f
can now view files if they are public
tcnichol 3dc9e01
check public access method added, fixed to work for files
tcnichol f046eb4
viewer cannot run extraction on file
tcnichol 06208dc
formatting
tcnichol 3757010
Merge branch 'main' into 485-public-datasets-visible-when-not-logged-in
tcnichol 8b38803
running codegen
tcnichol 6b11231
Merge remote-tracking branch 'origin/485-public-datasets-visible-when…
tcnichol 997ab94
formatting
tcnichol 91e8006
fixing package lock, ws wrong
tcnichol f0938ee
formatting
tcnichol a6d88e0
remove extraction history tab on public view
tcnichol 0b981bf
fix file summary on public file
tcnichol cff19e5
reverting change
tcnichol ea05335
fixing file status change, looks like that broke
tcnichol f928f59
return public access
tcnichol 2d1d685
fixing public visualization
tcnichol ebb055a
fixed the broken visualization on public files
tcnichol 17c9223
formatting
tcnichol f9a7c47
does not work
tcnichol 0eb7cce
think this fixed it
tcnichol b429e90
putting downloadPublicResource back in, errors not fixed
tcnichol 516dc3a
putting downloadPublicResource back in, errors not fixed
tcnichol cb68184
adding publicView option to the various visualizations. this means th…
tcnichol 2cbf2c6
fix package lock
tcnichol 3c40eba
removing console logs
tcnichol 7f9757f
removing console logs
tcnichol 286afd9
removing console logs
tcnichol ed2fa36
catch case if authorization is None and no public access for file
tcnichol c60dcd8
role was not working for dataset, fixed there but still not showing o…
tcnichol 4b7baf4
Merge branch 'main' into 485-public-datasets-visible-when-not-logged-in
tcnichol 83350ca
does not break on front end, still needs clean up
tcnichol 751e513
back end fixes after merge, some authorizations were not checked corr…
tcnichol 1d3f4ba
fix file tab extractor
tcnichol c31db10
Merge branch 'main' into 485-public-datasets-visible-when-not-logged-in
tcnichol f526cb4
file metadata from listeners now displays for public files
tcnichol 8f954d5
button back for add metadata dataset
tcnichol b534b39
ran codegen
tcnichol 0e75ecc
public metadata definitions
tcnichol fcfa1b0
metadata should work now for public when not signed in
tcnichol 6a7b4cf
fixed text visualization, endpoint for public_files had a typo
tcnichol 0548d9c
fixing more typoes
tcnichol 3b55341
formatting
tcnichol 38c66db
codegen
tcnichol 052e69a
removing search for now
tcnichol e1eab9f
increment should be false for getting public files
tcnichol 6bec4fd
adding public check to dataset files
tcnichol f7c7321
check public or authenticated in dataset routes
tcnichol b7e3592
don't use public route
tcnichol 4e47cc2
removing console logs
tcnichol 6a99a2f
fake data should populate both PUBLIC and AUTHENTICATED datasets
tcnichol cdeae3d
fixing download
tcnichol 72db254
Merge branch 'main' into 485-public-datasets-visible-when-not-logged-in
tcnichol 4bd99c5
fixing type on public/files
tcnichol 098b35b
removing unused methods
tcnichol 6c1b54d
remove divider
tcnichol 9bd7e70
codegen
tcnichol e8da356
put divider back in
tcnichol 7305ed3
removed divider
tcnichol 9556c38
can download public file from file menu now
tcnichol e1f02f2
remove unused method
tcnichol aa1763a
black formatting
tcnichol 7659974
black formatting
tcnichol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| import datetime | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. any reason you need date time? |
||
|
|
||
| from beanie import PydanticObjectId | ||
| from beanie.operators import Or, In | ||
| from bson import ObjectId | ||
|
|
@@ -92,7 +94,10 @@ async def get_dataset_role( | |
| if ( | ||
| current_dataset := await DatasetDB.get(PydanticObjectId(dataset_id)) | ||
| ) is not None: | ||
| if current_dataset.status == DatasetStatus.AUTHENTICATED.name: | ||
| if ( | ||
| current_dataset.status == DatasetStatus.AUTHENTICATED.name | ||
| or current_dataset.status == DatasetStatus.PUBLIC.name | ||
| ): | ||
| public_authorization_in = { | ||
| "dataset_id": PydanticObjectId(dataset_id), | ||
| "role": RoleType.VIEWER, | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.