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

bug/WP-459: Fix dispatch for reaching submitter admin's list registrations page #264

Merged
merged 6 commits into from
Jan 26, 2024

Conversation

edmondsgarrett
Copy link
Contributor

Overview

Adjust dispatch() used in SubmittersTable that is currently preventing APCD Submitter admins from reaching their registrations listing page + change user group checks in renewal listing + form

Related

Changes

  • Now using the base dispatch() method from TemplateView class (what RegistrationsTable is built on top of, which SubmittersTable is then built from)
  • Instead of using get_user_role to check user's permissions for renewal listing + form, instead use CMS groups via has_groups util function

Testing

  1. Go to https://localhost:8000/admin and set your user's Chosen Groups to just SUBMITTER_ADMIN
  2. Now go to https://localhost:8000/register/list-registration-requests and confirm listing comes up
  3. In one of the entries on this listing, click through the 'Actions' dropdown to get to 'Renew Registration' and confirm you are directed to the registration form with the data populated from that record
  4. Repeat steps 2 & 3 with the following roles and confirm the following:
    • APCD_ADMIN: the same results as SUBMITTER_ADMIN
    • SUBMITTER_USER: the listing does not show and instead you are redirected to https://localhost:8000/

UI

@sophia-massie
Copy link
Contributor

I'm no longer being redirected to the homepage, but the register/list-registration-requests/ page is empty. Trying to debug to find out what's going on. Where you seeing the registration list as only a submitter_admin? Trying to figure out what I could be doing differently.

@edmondsgarrett
Copy link
Contributor Author

I'm no longer being redirected to the homepage, but the register/list-registration-requests/ page is empty. Trying to debug to find out what's going on. Where you seeing the registration list as only a submitter_admin? Trying to figure out what I could be doing differently.

Yeah, SUBMITTER_ADMIN has been working for me on this branch.

Copy link
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

LGTM - tested as an apcd_admin, submitter_admin, both submitter_admin and apcd_admin, as well as a submitter_user. The table appeared or didn't appear as expected for each combination of roles.

@sophia-massie
Copy link
Contributor

I'm no longer being redirected to the homepage, but the register/list-registration-requests/ page is empty. Trying to debug to find out what's going on. Where you seeing the registration list as only a submitter_admin? Trying to figure out what I could be doing differently.

This resolved itself - seemed to be a cache issue

@edmondsgarrett edmondsgarrett merged commit ab2dd0c into main Jan 26, 2024
@edmondsgarrett edmondsgarrett deleted the bug/WP-459--fix-user-group-check branch January 26, 2024 15:13
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.

2 participants