Skip to content

Some fixes for viewer role #144

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Some fixes for viewer role #144

wants to merge 3 commits into from

Conversation

MWargelin
Copy link
Contributor

@MWargelin MWargelin commented Jun 5, 2025

  • Fix viewer role login
  • Make datasets menu item & index view appear for viewer role (possibility to view but not edit the data in datasets is not yet implemented)

Frustratingly one test is still failing, even though judging by manual tests everything works fine. After fixing that this PR is ready to be merged and a good stepping stone towards the viewer role, even though the role still needs some work.

@kausal-code-coverage
Copy link

kausal-code-coverage bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
paths/dataset_permission_policy.py 0.00% 20 Missing ⚠️
nodes/models.py 0.00% 9 Missing ⚠️
admin_site/wagtail_hooks.py 0.00% 1 Missing ⚠️
users/models.py 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (b03b39d) and HEAD (d1e6ad5). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (b03b39d) HEAD (d1e6ad5)
unittests 1 0

Impacted file tree graph

@@             Coverage Diff             @@
##             main     #144       +/-   ##
===========================================
- Coverage   39.12%   13.63%   -25.50%     
===========================================
  Files         228      226        -2     
  Lines       27141    27072       -69     
  Branches     3887     3880        -7     
===========================================
- Hits        10620     3691     -6929     
- Misses      15662    22782     +7120     
+ Partials      859      599      -260     
Flag Coverage Δ
e2e-tests 13.63% <0.00%> (-0.02%) ⬇️
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
nodes/roles.py 0.00% <ø> (-84.10%) ⬇️
paths/middleware.py 0.00% <ø> (-44.19%) ⬇️
admin_site/wagtail_hooks.py 0.00% <0.00%> (-93.88%) ⬇️
users/models.py 0.00% <0.00%> (-74.61%) ⬇️
nodes/models.py 9.11% <0.00%> (-39.51%) ⬇️
paths/dataset_permission_policy.py 0.00% <0.00%> (-70.44%) ⬇️

... and 140 files with indirect coverage changes

Impacted file tree graph

@MWargelin MWargelin force-pushed the fix/viewer-role branch 2 times, most recently from e45ee4c to c04c5a4 Compare June 18, 2025 07:50
@MWargelin MWargelin changed the title WIP: Fix viewer role Some fixes for viewer role Jun 19, 2025
@MWargelin MWargelin force-pushed the fix/viewer-role branch 5 times, most recently from a04545a to d1e6ad5 Compare June 19, 2025 12:32
Pre-existing viewer role could not log in. Fix login by modifying what
is considered an "adminable instance" for a user and by adding access to
wagtail admin as permission for the viewer role.
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.

1 participant