jojo/models/organization
limiting-factor d4de6a4e5c fix: UserTypeRemoteUser is an eligible organization member (#11326)
A [safeguard][0] was added to ensure a team member is not an organization. A [discussion][1] concluded that remote users should not yet be allowed to be team members, at least until it is implemented (by F3 or ActivityPub).

As [gof3 v3.11.25][2] has support for [teams][3], remote users need to be added as an eligible team member, otherwise compliance tests for the Forgejo internal driver [implementation][4] fail.

The IsUserByID function is renamed to IsAnEligibleTeamMemberByID to clarify its purpose. The TestIsUserConsistency is removed because the IsUser function is used in [an entirely different context][5] and there is no reason to ensure both are consistent. A unit test is added for IsAnEligibleTeamMemberByID as a replacement and also verifies organizations are not considered eligible.

[0]: https://codeberg.org/forgejo/forgejo/pulls/9757
[1]: https://codeberg.org/forgejo/forgejo/pulls/9757#issuecomment-7802255
[2]: https://code.forgejo.org/f3/gof3/releases/tag/v3.11.25
[3]: https://code.forgejo.org/f3/gof3/pulls/484/files
[4]: 9c565a9b37 (diff-241521b6ebc5a1da660421daea23da1dd1086158)
[5]: b66a76686d/routers/api/v1/api.go (L299-L308)

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11326
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Co-committed-by: limiting-factor <limiting-factor@posteo.com>
2026-02-17 02:39:46 +01: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: UserTypeRemoteUser is an eligible organization member (#11326) 2026-02-17 02:39:46 +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 feat(ui): add links to review request targets in issue comments (#8239) 2025-07-23 04:45:58 +02:00
team_invite.go chore: unify the usage of CryptoRandomString (#10110) 2025-11-15 13:24:53 +01:00
team_invite_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
team_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
team_repo.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00: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