mirror of
https://github.com/portainer/portainer.git
synced 2025-08-06 06:15:22 +02:00
fix(app/account): ensure newTransition exists in uiCanExit [EE-3336] (#7110)
This commit is contained in:
parent
84611a90a1
commit
58c44ad1ea
1 changed files with 7 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue