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

EREGCSC-2499 -- Enable subject lookup for non-logged in users #1167

Merged
merged 20 commits into from
Feb 12, 2024

Conversation

PhilR8
Copy link
Contributor

@PhilR8 PhilR8 commented Feb 7, 2024

Resolves EREGCSC-2499

Description

Allow unauthenticated users visit the Policy Repository and view Public documents.

See Figma comp for design.

This pull request changes:

  • Disables Public/Internal document checkboxes and makes "Public" the only checked box.
  • Adds login Call to Action in the left sidebar with a log in link if user is not logged in.
  • Only public item counts are shown in the Subject Table of Contents.
  • Internal items are not returned or displayed from the API until user logs in.

Steps to manually verify this change:

  1. Visit experimental deployment and make sure you are NOT logged in.
  2. Navigate to the Policy Repository page
  3. Make sure the "Documents to Show" checkboxes in the left sidebar are disabled and cannot be toggled via cursor or keyboard navigation.
    • Only "Public" should be checked
  4. Under each subject in the Subject Table of Contents, you should only see a count for "public resources"
  5. Filtering by subject and search by test string should work as expected but should only display public items.
  6. View the API endpoint in your browser and ensure that no internal documents are being returned
  7. View the API endpoint with internal documents as the document-type in your browser. You should receive a 403 Forbidden error.
  8. Click the "sign in" link on the left side of the page and make sure it takes you to the new custom login screen
    • if you have selected a subject and/or entered a search query, you should see them reflected in the next query param at the new custom login screen
  9. Log in using admin (since EUA doesn't work on all experimental deployments)
  10. Make sure "Documents to Show" checkboxes are active and can be toggled. Make sure site works as expected.
  11. View the API endpoint in your browser and notice that both internal and external documents are now being returned.
  12. View the API endpoint with internal documents as the document-type in your browser. You should not receive an error and internal documents should now be returned.

Copy link

github-actions bot commented Feb 7, 2024

✨ See the Django Site in action

Copy link

github-actions bot commented Feb 7, 2024

✨ See the Django Site in action

Copy link

github-actions bot commented Feb 8, 2024

✨ See the Django Site in action

Copy link

github-actions bot commented Feb 9, 2024

✨ See the Django Site in action

Copy link

github-actions bot commented Feb 9, 2024

✨ See the Django Site in action

@PhilR8 PhilR8 changed the title EREGCSC-2399 -- Enable subject lookup for non-logged in users EREGCSC-2499 -- Enable subject lookup for non-logged in users Feb 9, 2024
Copy link

github-actions bot commented Feb 9, 2024

✨ See the Django Site in action

Copy link

github-actions bot commented Feb 9, 2024

✨ See the Django Site in action

@PhilR8 PhilR8 marked this pull request as ready for review February 9, 2024 20:54
@PhilR8 PhilR8 added the Needs Review This PR needs a code review label Feb 9, 2024
Copy link
Contributor

@peggles2 peggles2 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@PhilR8 PhilR8 added Approved and removed Needs Review This PR needs a code review labels Feb 12, 2024
@PhilR8 PhilR8 merged commit 55094bb into main Feb 12, 2024
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants