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:
@@ -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,
|
||||
}}
|
||||
|
||||
@@ -49,9 +49,9 @@ func TestAuthenticateJWT(t *testing.T) {
|
||||
IsDisabled: false,
|
||||
HelpFlags1: 0,
|
||||
ClientParams: authn.ClientParams{
|
||||
SyncTeamMembers: false,
|
||||
SyncUser: true,
|
||||
AllowSignUp: true,
|
||||
SyncTeamMembers: true,
|
||||
LookUpParams: models.UserLookupParams{
|
||||
UserID: nil,
|
||||
Email: stringPtr("eai.doe@cor.po"),
|
||||
|
||||
Reference in New Issue
Block a user