fix(app/account): ensure newTransition exists in uiCanExit [EE-3336] (#7110)
parent
84611a90a1
commit
58c44ad1ea
|
@ -48,11 +48,13 @@ angular.module('portainer.app').controller('AccountController', [
|
||||||
};
|
};
|
||||||
|
|
||||||
this.uiCanExit = (newTransition) => {
|
this.uiCanExit = (newTransition) => {
|
||||||
if ($scope.userRole === 1 && newTransition && newTransition.to().name === 'portainer.settings.authentication') {
|
if (newTransition) {
|
||||||
return true;
|
if ($scope.userRole === 1 && newTransition.to().name === 'portainer.settings.authentication') {
|
||||||
}
|
return true;
|
||||||
if (newTransition.to().name === 'portainer.logout') {
|
}
|
||||||
return true;
|
if (newTransition.to().name === 'portainer.logout') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($scope.forceChangePassword) {
|
if ($scope.forceChangePassword) {
|
||||||
ModalService.confirmForceChangePassword();
|
ModalService.confirmForceChangePassword();
|
||||||
|
|
Loading…
Reference in New Issue