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

Add approval workflow for paid registrar requests #3659

Merged
merged 31 commits into from
Nov 20, 2024

Conversation

cmsetzer
Copy link
Contributor

This builds upon our work in #3595 and #3631 to add an approval workflow for sign-up requests by paid registrars (a.k.a. "firms"). An approval workflow already exists for library sign-up requests; this branch generalizes the library approval form so it supports firms as well.

Before

  • User submitted a paid registrar request at https://perma.cc/sign-up/firms
  • Perma admins then emailed them, going back and forth a few times to get registrar info and set a base rate
  • Perma admins then used the Perma DB admin interface to manually create a registrar, populate fields, and assign the base rate

After

  • User submits paid registrar request at https://perma.cc/sign-up/firms
  • A pending registrar is automatically created in the Perma DB with registrar name, email, etc. populated
  • An email is sent out to user and Perma admins with all the field data supplied by the user
  • Using the approval link in the email (or by clicking a button on the Manage Registrars screen), Perma admins can approve/reject the registrar request and change the base rate in one place
    • As we've discussed, if the pending registrar does not already have a registrar user associated, Perma admins must assign a registrar user before they can approve/reject the registrar. A user search interface is provided on the approval page

@cmsetzer cmsetzer requested a review from a team as a code owner November 18, 2024 22:15
@cmsetzer cmsetzer requested review from teovin and rebeccacremona and removed request for a team and teovin November 18, 2024 22:15
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 83.76068% with 19 lines in your changes missing coverage. Please review.

Project coverage is 69.11%. Comparing base (3aba690) to head (8567f78).
Report is 13 commits behind head on develop.

Files with missing lines Patch % Lines
perma_web/perma/views/user_sign_up.py 79.31% 12 Missing ⚠️
perma_web/perma/forms.py 80.00% 7 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3659      +/-   ##
===========================================
- Coverage    69.64%   69.11%   -0.53%     
===========================================
  Files           54       54              
  Lines         7339     7467     +128     
===========================================
+ Hits          5111     5161      +50     
- Misses        2228     2306      +78     

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


🚨 Try these New Features:

Copy link
Contributor

@rebeccacremona rebeccacremona left a comment

Choose a reason for hiding this comment

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

This looks great! This is going to be such a helpful feature!!

A couple thoughts related to searching:

  • great idea to re-use the user list markup

  • I think if no search results are found, it's a little confusing, it looks like the form maybe didn't submit

  • I think the experience of submitting the search form could be frustrating for keyboard users and screen reader users, since focus will reset to the top of the page upon form submission. Since this is an internal, admin-only page, and since this page isn't currently set up to have any javascript... it's probably not worth the effort to address now. But, if we ever get around to redesigning this part of the app, good for us to think about.

LGTM, left a few remarks and questions

perma_web/perma/forms.py Outdated Show resolved Hide resolved
perma_web/perma/forms.py Show resolved Hide resolved
perma_web/perma/forms.py Show resolved Hide resolved
'''
Does the firm signup form submit as expected? Success cases.
'''
firm_organization_form = self.create_firm_organization_form()
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to officially apologize for these tests.

perma_web/perma/utils.py Show resolved Hide resolved
perma_web/perma/utils.py Show resolved Hide resolved
perma_web/perma/views/user_sign_up.py Outdated Show resolved Hide resolved
perma_web/perma/views/user_sign_up.py Outdated Show resolved Hide resolved
@cmsetzer
Copy link
Contributor Author

Thanks for the review @rebeccacremona! I fixed the issues you raised as well as a couple other small bugs I discovered. Going ahead and merging this.

@cmsetzer cmsetzer merged commit fc48ba8 into harvard-lil:develop Nov 20, 2024
2 checks passed
@cmsetzer cmsetzer deleted the other-org-approval-workflow branch November 20, 2024 23:35
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