mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Login: only enabled oauth options are now shown on login page
This commit is contained in:
@@ -34,12 +34,7 @@ function (_, crypto) {
|
||||
}
|
||||
};
|
||||
|
||||
// This initializes a new hash on purpose, to avoid adding parameters to
|
||||
// config.js without providing sane defaults
|
||||
var settings = {};
|
||||
_.each(defaults, function(value, key) {
|
||||
settings[key] = typeof options[key] !== 'undefined' ? options[key] : defaults[key];
|
||||
});
|
||||
var settings = _.extend(options, defaults);
|
||||
|
||||
var parseBasicAuth = function(datasource) {
|
||||
var passwordEnd = datasource.url.indexOf('@');
|
||||
|
||||
@@ -16,6 +16,10 @@ function (angular, config) {
|
||||
};
|
||||
|
||||
$scope.grafana.sidemenu = false;
|
||||
|
||||
$scope.googleAuthEnabled = config.googleAuthEnabled;
|
||||
$scope.githubAuthEnabled = config.githubAuthEnabled;
|
||||
|
||||
$scope.loginMode = true;
|
||||
$scope.submitBtnClass = 'btn-inverse';
|
||||
$scope.submitBtnText = 'Log in';
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="login-oauth text-center">
|
||||
<a class="btn btn-google" href="login/google" target="_self">
|
||||
<a class="btn btn-google" href="login/google" target="_self" ng-if="googleAuthEnabled">
|
||||
<i class="fa fa-google"></i>
|
||||
with Google
|
||||
</a>
|
||||
<a class="btn btn-github" href="login/github" target="_self">
|
||||
<a class="btn btn-github" href="login/github" target="_self" ng-if="githubAuthEnabled">
|
||||
<i class="fa fa-github"></i>
|
||||
with Github
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user