Skip to content

Refactor Join Form on abtech.org #453

@DaAwesomeP

Description

@DaAwesomeP

A new form endpoint should be created to add users to the mailing list. Note that all this forms needs to do is send an email (it does not actually need to add anyone to the list yet).

  • Form field andrewid
  • Form field preferred_name
  • Form field last_name
  • Should reject AndrewIDs that contain @ or other non-AndrewID characters (no dots, underscores, etc.). Frontend will instruct user not to input the @. Should reject AndrewIDs with too many characters or not enough characters.
  • Should reject empty names and AndrewIDs
  • On bad form input, should respond with a 401 code and text about what is wrong (plaintext)
  • On successful form input, should respond with 200 code (can be empty body)
  • On failure should respond with 500
  • On success should send an email to the AndrewID and [email protected] from the email address [email protected] (this address is preferably in a config file somewhere, or see wishlist below)
  • Email sent should be from the contents of /afs/andrew/usr/abtech/private/scripts/mail.techling (this URL is preferably in a config file somewhere, or see wishlist below)
  • Email sent should have a subject of [AB Tech] Greetings $preferred_name! (this template is preferably in a config file somewhere, or see wishlist below)

Wishlist for later:

  • Configure the to/from address in Tracker UI
  • Configure the mail contents path in Tracker UI
  • Configure email subject template in Tracker UI (or maybe this could just be the first line of the template, this would require a change to the other AFS scripts we use)
  • Edit the mail content file in Tracker UI
  • Include name in mail contents (but this would require a change to the other AFS scripts we use)
  • Validate AndrewID is valid and active, then check for duplicates and if none found add AndrewID to /afs/andrew.cmu.edu/usr/abtech/abtech-recruit.dl

Original implementation: https://github.com/ABTech/abtech.org/blob/8458d12ad6ac79297ec59aece7a8ac9011461303/website/forms.py#L13-L47

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions