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 initial support for durable invitation links. #2056

Merged
merged 3 commits into from
May 9, 2024

Commits on May 9, 2024

  1. Add initial support for durable invitation links.

    - Add invitation codes to the hunt schema. Codes are randomly generated
      IDs.
    - Allow admins and hunt operators to (re)generate and clear invitation
      links from the hunt profile list page.
    - Allow any user with invitation permissions to see the current
      invitation link (if any) from the hunt profile list page.
    - Add an authenticated /join/:invitationCode endpoint which adds the
      current user to the hunt with that code and redirects to that hunt
      page. (If a user is unauthenticated when they open this link, they
      will be redirected here after signing in.)
    
    See deathandmayhem#2047
    jpd236 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    5cab723 View commit details
    Browse the repository at this point in the history
  2. Tweaks to invitation codes from review feedback.

    - Move to a dedicated model. This prevents invitation codes from leaking
    unintentionally as part of the hunt, and also lets us track old code
    generation, who generated codes, etc.
    
    - Change invitation view from a link to plain text with a Copy to
    Clipboard button.
    jpd236 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    7542d27 View commit details
    Browse the repository at this point in the history
  3. Use dialogs for invitation code mutations.

    Extract existing dialogs to a common helper and repurpose for
    (re)generating and disabling invitation links. Also fix a small bug
    where an error will remain visible after dismissing and reopening a
    dialog for a failed operation, and use a simpler method of calculating
    an absolute URL when showing the invitation link.
    jpd236 committed May 9, 2024
    Configuration menu
    Copy the full SHA
    8b0154b View commit details
    Browse the repository at this point in the history