mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-22 05:36:59 +00:00
R67: apply allowedRolesAndGroups gate to SSE/WS bypass
This commit is contained in:
@@ -42,7 +42,7 @@ func TestApplyBypassUserHeaders_SanitizesIdentifier(t *testing.T) {
|
||||
logger: NewLogger("debug"),
|
||||
}
|
||||
|
||||
if ok := oidc.applyBypassUserHeaders(req, "test"); !ok {
|
||||
if ok, _ := oidc.applyBypassUserHeaders(req, "test"); !ok {
|
||||
t.Fatalf("applyBypassUserHeaders returned false; bypass should be honored")
|
||||
}
|
||||
if v := req.Header.Get("X-Forwarded-User"); v != "" {
|
||||
@@ -83,7 +83,7 @@ func TestApplyBypassUserHeaders_KeepsCleanIdentifier(t *testing.T) {
|
||||
logger: NewLogger("debug"),
|
||||
}
|
||||
|
||||
if ok := oidc.applyBypassUserHeaders(req, "test"); !ok {
|
||||
if ok, _ := oidc.applyBypassUserHeaders(req, "test"); !ok {
|
||||
t.Fatalf("applyBypassUserHeaders returned false; bypass should be honored")
|
||||
}
|
||||
if v := req.Header.Get("X-Forwarded-User"); v != "[email protected]" {
|
||||
|
||||
Reference in New Issue
Block a user