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

members only datasets frontend v2 #392

Merged

Conversation

struan
Copy link
Member

@struan struan commented Jan 16, 2024

This does three things:

  • hides non public datasets from unauthenticated users
  • updates the area page layout a bit to tidy up the resulting empty boxes etc for unauthenticated users
  • turns off the mandatory login for all pages

Fixes #280

This replaces #312 which was too out of sync with the area page updates.

@zarino
Copy link
Member

zarino commented Jan 17, 2024

@struan I’ve pushed a fixup commit that adds a yellow section to the bottom of the area page, advertising the extra data for logged in members:

Screenshot 2024-01-17 at 09 49 20

Migrations hell prevented me actually testing this out, so I did the work in main and then cherry-picked into this branch, guessing that {% if not user.is_authenticated %} was the right thing to check in the template – please replace if not :-)

(FYI longer term, I think we’ll split this yellow section into two columns, and use one of the columns to host the email signup form required by #377.)

@struan struan force-pushed the 280-members-only-datasets-frontend-v2 branch 2 times, most recently from ee75189 to 3480d29 Compare January 17, 2024 10:32
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (d7fda40) 82.80% compared to head (9cb7bd2) 83.17%.
Report is 7 commits behind head on multiple-geometry-staging.

Files Patch % Lines
hub/transformers.py 33.33% 6 Missing ⚠️
hub/mixins.py 33.33% 3 Missing and 1 partial ⚠️
hub/management/commands/base_importers.py 25.00% 3 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##           multiple-geometry-staging     #392      +/-   ##
=============================================================
+ Coverage                      82.80%   83.17%   +0.36%     
=============================================================
  Files                            100      100              
  Lines                           3077     3007      -70     
  Branches                         347      315      -32     
=============================================================
- Hits                            2548     2501      -47     
+ Misses                           454      430      -24     
- Partials                          75       76       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zarino zarino force-pushed the 280-members-only-datasets-frontend-v2 branch from e70ede0 to 3c853a9 Compare January 18, 2024 15:56
@zarino zarino force-pushed the 280-members-only-datasets-frontend-v2 branch from 3c853a9 to 9cb7bd2 Compare January 18, 2024 15:57
@zarino zarino marked this pull request as ready for review January 18, 2024 15:58
@zarino zarino merged commit 9cb7bd2 into multiple-geometry-staging Jan 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only allow logged-in users to see “members only” datasets on area, explore, and data source pages
2 participants