SAML: Show SAML login button even if OAuth is disabled (#17993)

* Move the SAML button outside of the oauth div
* Don't attempt to search cookies with an empty name
This commit is contained in:
gotjosh
2019-07-09 10:15:52 +01:00
committed by GitHub
parent 78ca55f3d7
commit 332920954e
2 changed files with 8 additions and 4 deletions
+4
View File
@@ -182,6 +182,10 @@ func initContextWithBasicAuth(ctx *models.ReqContext, orgId int64) bool {
}
func initContextWithToken(authTokenService models.UserTokenService, ctx *models.ReqContext, orgID int64) bool {
if setting.LoginCookieName == "" {
return false
}
rawToken := ctx.GetCookie(setting.LoginCookieName)
if rawToken == "" {
return false