gitforge/models/organization
Antonin Delpeuch c99b35cfa4 feat: setting to add team members by invitations (#12845)
Fixes #12564. Fixes #8951.

This introduces a new setting, `ADD_MEMBERS_BY_INVITATIONS`, which is turned off by default.
When turned on, adding a user to a team issues an invitation instead of adding them directly to the team.
A prerequisite for this work was to be able to link invitations to existing users (so far, they were only associated to an email address, since those invitations were meant to be issued to users who didn't have an account yet).

---

I plan to work on the following improvements, which I propose to do in separate PRs given that this one is already a bit big:
* generate an in-app notification for the invited user
* advertise the invitation to the invited user from the org page as well (#12120)
* show the list of invited users in the list of organization members (not just on the team page)

and various other improvements to invitations (#12570, #12716).

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12845
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2026-06-15 01:46:25 +02:00
..
TestFindOrgs fix: show membership of limited orgs 2025-06-06 19:33:26 +02:00
TestInconsistentOwnerTeam [BUG] Don't allow owner team with incorrect unit access 2024-10-11 14:48:47 +02:00
main_test.go chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
org.go fix: add missing deleting beans for organizations (#11699) 2026-03-17 09:11:52 +01:00
org_list.go fix(ui): wrong org dashboard links when switching dashboard context (#8688) 2025-08-07 14:32:55 +02:00
org_list_test.go fix(ui): wrong org dashboard links when switching dashboard context (#8688) 2025-08-07 14:32:55 +02:00
org_repo.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
org_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
org_user.go fix: UserTypeRemoteUser is an eligible organization member (#11326) 2026-02-17 02:39:46 +01:00
org_user_test.go fix: UserTypeRemoteUser is an eligible organization member (#11326) 2026-02-17 02:39:46 +01:00
team.go fix: paginate list of repositories in a team (#12549) 2026-05-14 22:30:56 +02:00
team_invite.go feat: setting to add team members by invitations (#12845) 2026-06-15 01:46:25 +02:00
team_invite_test.go feat: setting to add team members by invitations (#12845) 2026-06-15 01:46:25 +02:00
team_list.go feat: add dynamic group mappings for OIDC (#11656) 2026-05-22 12:38:20 +02:00
team_repo.go chore: split AddRepository and AddTeamMember to return the inserted value (#11342) 2026-03-11 03:40:32 +01:00
team_test.go feat(ui): add links to review request targets in issue comments (#8239) 2025-07-23 04:45:58 +02:00
team_unit.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
team_user.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00