Skip to content

Invite people to teams #808

Closed
Closed

Description

@AdrianDAlessandro

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem?

Managers should be able to invite people to their teams

Describe the solution you'd like

Include a button on the team page (that only the managers can see) that links to a from from which they can send an invitation to any email to join the team. If they do not have an account, it should link to the registration page.

This requires:

  • An invite form
  • An accept invitation page

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. moved this from 📋 Backlog to 🛑 On hold in Web App Developmenton Oct 14, 2026
  2. moved this from 🛑 On hold to 👀 In review in Web App Developmenton Nov 12, 2026
  3. AdrianDAlessandro commented on Nov 12, 2026

    @AdrianDAlessandro
    CollaboratorAuthor

    The details of this issue have changed. The updated implementation ticket follows:

    02: Create teams and manage the complete membership lifecycle

    What to build: A person can create and administer a team; managers can generate a team-wide invitation link and manage membership and roles; link holders join only after accepting; and a team always retains at least one manager.

    Blocked by: 01: Derive team permissions from membership and backfill existing teams.

    Status: implemented

    • Creating a team for a person atomically creates their membership as the first team manager.
    • A manager can generate a signed team-wide link for external sharing; no invitation record or email is created, and links expire after 24 hours.
    • Any signed-in user holding a valid link can explicitly accept it; acceptance atomically creates a non-manager membership, while opening the link alone grants no team or profile access.
    • Link acceptance rechecks that its generating manager is still a manager; one link may add multiple people, cannot be individually withdrawn, and is a no-op for existing members.
    • Managers can remove a member and promote or demote another member; a member can leave at any time.
    • A team cannot be left without a manager: demoting, removing, or leaving as its last manager is rejected, while deleting the team remains allowed.
    • Tests verify the externally observable membership and permission outcomes for team-link generation and acceptance, role changes, removal, leaving, and last-manager protection.
    • Admin membership edits preserve the last-manager invariant, and membership changes continue to synchronize permissions as defined by ticket 01.

    Comments

    Agreed follow-up: team view access and generic views

    Follow-up status: implemented.

    • Use TermsAcceptedMixin on both team invitation views, before team lookup
      and permission checks. Gate both GET and POST so users who have not accepted
      terms cannot generate links or create memberships.
    • Preserve the existing terms flow: anonymous users go to login; signed-in users
      who have not accepted terms go to terms acceptance. After accepting terms,
      users go to account overview and must reopen their invitation link.
    • Use Guardian's PermissionRequiredMixin on TeamInvitationLinkView, checking
      main.manage_team_members against the Team resolved by the URL slug.
      Set return_404=True and keep global-permission fallback disabled. Unknown
      teams and unauthorized users continue to receive 404 responses. Preserve
      service-level authorization checks.
    • Use TemplateView as the base for both classes. Use template_name and
      get_context_data() for GET rendering and explicit post() handlers with
      render_to_response() for successful POST responses. Preserve existing
      templates and context values; invalid invitations still use the separate
      invalid-link template with HTTP 400. GET never creates membership.
    • Document terms acceptance as the default for login-required application views,
      with essential exceptions for terms acceptance and authentication/account
      recovery. Do not change unrelated views, services, URLs, or domain definitions.
    • Test both HTTP methods, blocked side effects, existing permission and 404
      behavior, and successful flows for users who have accepted terms. Keep view
      tests in tests/main/test_main_views.py and reuse shared view-test helpers.

    @TinyMarsh @Sahil590, please review the updated issue details.

  4. moved this from 👀 In review to ✅ Done in Web App Developmenton Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions