mirror of
https://github.com/portainer/portainer.git
synced 2025-07-25 00:09:40 +02:00
fix(authentication): remove any user credentials if not allowed on any endpoint (#719)
This commit is contained in:
parent
c243a02e7a
commit
9e818c2882
1 changed files with 1 additions and 0 deletions
|
@ -104,6 +104,7 @@ function ($scope, $state, $stateParams, $window, $timeout, $sanitize, Config, Au
|
||||||
else if (data.length === 0 && userDetails.role === 1) {
|
else if (data.length === 0 && userDetails.role === 1) {
|
||||||
$state.go('endpointInit');
|
$state.go('endpointInit');
|
||||||
} else if (data.length === 0 && userDetails.role === 2) {
|
} else if (data.length === 0 && userDetails.role === 2) {
|
||||||
|
Authentication.logout();
|
||||||
$scope.authData.error = 'User not allowed. Please contact your administrator.';
|
$scope.authData.error = 'User not allowed. Please contact your administrator.';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue