[release-11.3.6] Auth: Fix SAML user IsExternallySynced not being set correctly (#103101)
Auth: Fix SAML user IsExternallySynced not being set correctly (#98487)
(cherry picked from commit 345757c3ae)
Co-authored-by: xavi <114113189+volcanonoodle@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/services/authn"
|
||||
"github.com/grafana/grafana/pkg/services/authn/authntest"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@@ -258,9 +260,17 @@ func TestOrgUsersAPIEndpoint_updateOrgRole(t *testing.T) {
|
||||
server := SetupAPITestServer(t, func(hs *HTTPServer) {
|
||||
hs.Cfg = setting.NewCfg()
|
||||
hs.Cfg.LDAPAuthEnabled = tt.AuthEnabled
|
||||
if tt.AuthModule == login.LDAPAuthModule {
|
||||
switch tt.AuthModule {
|
||||
case login.LDAPAuthModule:
|
||||
hs.Cfg.LDAPAuthEnabled = tt.AuthEnabled
|
||||
hs.Cfg.LDAPSkipOrgRoleSync = tt.SkipOrgRoleSync
|
||||
case login.GrafanaComAuthModule:
|
||||
hs.authnService = &authntest.FakeService{
|
||||
EnabledClients: []string{authn.ClientWithPrefix("grafana_com")},
|
||||
ExpectedClientConfig: &authntest.FakeSSOClientConfig{
|
||||
ExpectedIsSkipOrgRoleSyncEnabled: tt.SkipOrgRoleSync,
|
||||
},
|
||||
}
|
||||
}
|
||||
// AuthModule empty means basic auth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user