1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-30 02:39:41 +02:00

feat(global): add a --no-auth flag to disable authentication

This commit is contained in:
Anthony Lapenna 2017-02-01 22:10:07 +13:00
parent 779fcf8e7f
commit 0f81ad5654
16 changed files with 203 additions and 191 deletions

View file

@ -13,6 +13,23 @@ function ($scope, $state, $stateParams, $window, $timeout, $sanitize, Config, Au
error: false
};
if (!$scope.applicationState.application.authentication) {
EndpointService.getActive().then(function success(data) {
StateManager.updateEndpointState(true)
.then(function success() {
$state.go('dashboard');
}, function error(err) {
Messages.error("Failure", err, 'Unable to connect to the Docker endpoint');
});
}, function error(err) {
if (err.status === 404) {
$state.go('endpointInit');
} else {
Messages.error("Failure", err, 'Unable to verify Docker endpoint existence');
}
});
}
if ($stateParams.logout) {
Authentication.logout();
}