Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite47e6c8

Browse files
committed
add unit test
1 parentdb5a8aa commite47e6c8

File tree

3 files changed

+208
-188
lines changed

3 files changed

+208
-188
lines changed

‎coderd/userauth.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,11 +1061,15 @@ func (api *API) oidcGroups(ctx context.Context, mergedClaims map[string]interfac
10611061
}
10621062

10631063
if!inAllowList {
1064+
detail:=fmt.Sprintf("Ask an administrator to add one of your groups to the whitelist: %s",strings.Join(groups,", "))
1065+
iflen(groups)==0 {
1066+
detail="You are currently not a member of any groups!"
1067+
}
10641068
returnusingGroups,groups,&httpError{
10651069
code:http.StatusForbidden,
1066-
msg:"You aren'ta member of anauthorized group!",
1067-
detail:fmt.Sprintf("You must be a member of one of the following groups: %v",api.OIDCConfig.GroupAllowList),
1068-
renderStaticPage:false,
1070+
msg:"Nota member of anallowed group",
1071+
detail:detail,
1072+
renderStaticPage:true,
10691073
}
10701074
}
10711075
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp