mirror of
https://github.com/grafana/grafana.git
synced 2024-11-27 03:11:01 -06:00
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:
parent
78ca55f3d7
commit
332920954e
@ -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
|
||||
|
@ -45,6 +45,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
<a class="btn btn-medium btn-service btn-service--github login-btn" href="login/saml" target="_self" ng-if="samlEnabled">
|
||||
<i class="btn-service-icon fa fa-key"></i>
|
||||
Sign in with SAML
|
||||
</a>
|
||||
<div class="login-oauth text-center" ng-show="oauthEnabled">
|
||||
<a class="btn btn-medium btn-service btn-service--google login-btn" href="login/google" target="_self" ng-if="oauth.google">
|
||||
<i class="btn-service-icon fa fa-google"></i>
|
||||
@ -68,10 +72,6 @@
|
||||
<i class="btn-service-icon fa fa-sign-in"></i>
|
||||
Sign in with {{oauth.generic_oauth.name}}
|
||||
</a>
|
||||
<a class="btn btn-medium btn-service btn-service--github login-btn" href="login/saml" target="_self" ng-if="samlEnabled">
|
||||
<i class="btn-service-icon fa fa-key"></i>
|
||||
Sign in with SAML
|
||||
</a>
|
||||
</div>
|
||||
<div class="login-signup-box" ng-show="!disableUserSignUp">
|
||||
<div class="login-signup-title p-r-1">
|
||||
|
Loading…
Reference in New Issue
Block a user