You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Activity
AdrianDAlessandro commentedon Nov 12, 2026
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
Comments
Agreed follow-up: team view access and generic views
Follow-up status: implemented.
TermsAcceptedMixinon both team invitation views, before team lookupand permission checks. Gate both GET and POST so users who have not accepted
terms cannot generate links or create memberships.
who have not accepted terms go to terms acceptance. After accepting terms,
users go to account overview and must reopen their invitation link.
PermissionRequiredMixinonTeamInvitationLinkView, checkingmain.manage_team_membersagainst the Team resolved by the URL slug.Set
return_404=Trueand keep global-permission fallback disabled. Unknownteams and unauthorized users continue to receive 404 responses. Preserve
service-level authorization checks.
TemplateViewas the base for both classes. Usetemplate_nameandget_context_data()for GET rendering and explicitpost()handlers withrender_to_response()for successful POST responses. Preserve existingtemplates and context values; invalid invitations still use the separate
invalid-link template with HTTP 400. GET never creates membership.
with essential exceptions for terms acceptance and authentication/account
recovery. Do not change unrelated views, services, URLs, or domain definitions.
behavior, and successful flows for users who have accepted terms. Keep view
tests in
tests/main/test_main_views.pyand reuse shared view-test helpers.@TinyMarsh @Sahil590, please review the updated issue details.