|
|
@@ -7,8 +7,7 @@ function (angular, config) {
|
|
|
|
|
|
var module = angular.module('grafana.controllers');
|
|
|
|
|
|
- module.controller('LoginCtrl', function($scope, backendSrv, $location, $routeParams) {
|
|
|
-
|
|
|
+ module.controller('LoginCtrl', function($scope, backendSrv) {
|
|
|
$scope.formModel = {
|
|
|
user: '',
|
|
|
email: '',
|
|
|
@@ -19,6 +18,7 @@ function (angular, config) {
|
|
|
|
|
|
$scope.googleAuthEnabled = config.googleAuthEnabled;
|
|
|
$scope.githubAuthEnabled = config.githubAuthEnabled;
|
|
|
+ $scope.disableUserSignUp = config.disableUserSignUp;
|
|
|
|
|
|
$scope.loginMode = true;
|
|
|
$scope.submitBtnClass = 'btn-inverse';
|
|
|
@@ -26,10 +26,6 @@ function (angular, config) {
|
|
|
$scope.strengthClass = '';
|
|
|
|
|
|
$scope.init = function() {
|
|
|
- if ($routeParams.logout) {
|
|
|
- $scope.logout();
|
|
|
- }
|
|
|
-
|
|
|
$scope.$watch("loginMode", $scope.loginModeChanged);
|
|
|
$scope.passwordChanged();
|
|
|
};
|
|
|
@@ -84,13 +80,6 @@ function (angular, config) {
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- $scope.logout = function() {
|
|
|
- backendSrv.post('/logout').then(function() {
|
|
|
- $scope.appEvent('logged-out');
|
|
|
- $location.search({});
|
|
|
- });
|
|
|
- };
|
|
|
-
|
|
|
$scope.login = function() {
|
|
|
delete $scope.loginError;
|
|
|
|