mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:03:01 +08:00
SAML: Do not SAML SLO if user is not SAML authenticated (#53418)
* Only SLO user if the user is using SAML * only one source of truth for auth module info * ensure SAML is also enabled and not only SLO * move auth module naming to auth module login package * use constants in other previously unused spots
This commit is contained in:
@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
loginservice "github.com/grafana/grafana/pkg/services/login"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
@ -658,9 +659,9 @@ func TestLoginPostRunLokingHook(t *testing.T) {
|
||||
{
|
||||
desc: "valid LDAP user",
|
||||
authUser: testUser,
|
||||
authModule: "ldap",
|
||||
authModule: loginservice.LDAPAuthModule,
|
||||
info: models.LoginInfo{
|
||||
AuthModule: "ldap",
|
||||
AuthModule: loginservice.LDAPAuthModule,
|
||||
User: testUser,
|
||||
HTTPStatus: 200,
|
||||
},
|
||||
|
Reference in New Issue
Block a user