1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 05:45:22 +02:00

fix(app/account): ensure newTransition exists in uiCanExit [EE-3336] (#7110)

This commit is contained in:
LP B 2022-06-24 17:35:35 +02:00 committed by GitHub
parent 84611a90a1
commit 58c44ad1ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,11 +48,13 @@ angular.module('portainer.app').controller('AccountController', [
};
this.uiCanExit = (newTransition) => {
if ($scope.userRole === 1 && newTransition && newTransition.to().name === 'portainer.settings.authentication') {
return true;
}
if (newTransition.to().name === 'portainer.logout') {
return true;
if (newTransition) {
if ($scope.userRole === 1 && newTransition.to().name === 'portainer.settings.authentication') {
return true;
}
if (newTransition.to().name === 'portainer.logout') {
return true;
}
}
if ($scope.forceChangePassword) {
ModalService.confirmForceChangePassword();