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
Fixes#19555
Test-Instructions:
#21441 (comment)
This PR implements the mapping of user groups provided by OIDC providers
to orgs teams in Gitea. The main part is a refactoring of the existing
LDAP code to make it usable from different providers.
Refactorings:
- Moved the router auth code from module to service because of import
cycles
- Changed some model methods to take a `Context` parameter
- Moved the mapping code from LDAP to a common location
I've tested it with Keycloak but other providers should work too. The
JSON mapping format is the same as for LDAP.

---------
Co-authored-by: Lunny Xiao <[email protected]>
glob_pattern_error = ` glob pattern is invalid: %s.`
478
478
regex_pattern_error = ` regex pattern is invalid: %s.`
479
479
username_error = ` can only contain alphanumeric chars ('0-9','a-z','A-Z'), dash ('-'), underscore ('_') and dot ('.'). It cannot begin or end with non-alphanumeric chars, and consecutive non-alphanumeric chars are also forbidden.`
480
+
invalid_group_team_map_error = ` mapping is invalid: %s`
480
481
unknown_error = Unknown error:
481
482
captcha_incorrect = The CAPTCHA code is incorrect.
482
483
password_not_match = The passwords do not match.
@@ -2758,6 +2759,8 @@ auths.oauth2_required_claim_value_helper = Set this value to restrict login from
2758
2759
auths.oauth2_group_claim_name = Claim name providing group names for this source. (Optional)
2759
2760
auths.oauth2_admin_group = Group Claim value for administrator users. (Optional - requires claim name above)
2760
2761
auths.oauth2_restricted_group = Group Claim value for restricted users. (Optional - requires claim name above)
2762
+
auths.oauth2_map_group_to_team = Map claimed groups to Organization teams. (Optional - requires claim name above)
2763
+
auths.oauth2_map_group_to_team_removal = Remove users from synchronized teams if user does not belong to corresponding group.
2761
2764
auths.enable_auto_register = Enable Auto Registration
0 commit comments