Github "No Teams" Bugfix
The Github authentication provider now properly treats members of an
organization who are not members of any of that org's teams as matching
the default rule (with no team assertion).  Previously, such users were
completely unable to be assigned to any tenant.
@@ -180,8 +180,11 @@ func (gh *GithubAuthProvider) HandleRedirect(w http.ResponseWriter, req *http.Re
func (gh GithubAuthProvider) resolveOrgAndTeam(org string, teams []string) (string, string, bool) {
if candidate, ok := gh.Mapping[org]; ok {
for _, match := range candidate.Rights {
+ if match.Team == "" {
+ return candidate.Tenant, match.Role, true
+ }
for _, team := range teams {
- if match.Team == "" || match.Team == team {
+ if match.Team == team {
return candidate.Tenant, match.Role, true
}
}
