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:
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) => {
|
||||
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue