Auth: Add disable of team sync for JWT Authentication (#62191)

* fix: disable team sync for JWT Authentication

* add: comment to test

* change test to conform to new expected behavior

* fix: spelling

* formatting
This commit is contained in:
Eric Leijonmarck
2023-01-27 16:05:25 +01:00
committed by GitHub
parent df2db3bb23
commit 5531e22f46
6 changed files with 39 additions and 10 deletions

View File

@@ -69,8 +69,9 @@ func (s *JWT) Authenticate(ctx context.Context, r *authn.Request) (*authn.Identi
AuthID: sub,
OrgRoles: map[int64]org.RoleType{},
ClientParams: authn.ClientParams{
SyncUser: true,
SyncTeamMembers: true,
SyncUser: true,
// We do not allow team member sync from JWT Authentication
SyncTeamMembers: false,
AllowSignUp: s.cfg.JWTAuthAutoSignUp,
EnableDisabledUsers: false,
}}