diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js index 29b947529b..043937b646 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js @@ -56,13 +56,9 @@ NfRegistryUserLogin.prototype = { var self = this; this.nfRegistryApi.postToLogin(username.value, password.value).subscribe(function (response) { if (response || response.status === 200) { - //successful login update registry config - self.nfRegistryApi.getRegistryConfig().subscribe(function (registryConfig) { - self.nfRegistryService.registry.config = registryConfig; - self.nfRegistryService.currentUser.anonymous = false; - self.dialogRef.close(); - self.nfRegistryLoginAuthGuard.checkLogin(self.nfRegistryService.redirectUrl); - }); + self.nfRegistryService.currentUser.anonymous = false; + self.dialogRef.close(); + self.nfRegistryLoginAuthGuard.checkLogin(self.nfRegistryService.redirectUrl); } }); }, diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.auth-guard.service.js b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.auth-guard.service.js index 4300835020..962e181ae6 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.auth-guard.service.js +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.auth-guard.service.js @@ -78,6 +78,11 @@ NfRegistryUsersAdministrationAuthGuard.prototype = { // render the logout button if there is a token locally if (self.nfStorage.getItem('jwt') !== null) { self.nfRegistryService.currentUser.canLogout = true; + + // Update Registry Configuration following successful login + self.nfRegistryApi.getRegistryConfig().subscribe(function (registryConfig) { + self.nfRegistryService.registry.config = registryConfig; + }); } // redirect to explorer perspective if not admin @@ -201,6 +206,11 @@ NfRegistryWorkflowsAdministrationAuthGuard.prototype = { // render the logout button if there is a token locally if (self.nfStorage.getItem('jwt') !== null) { self.nfRegistryService.currentUser.canLogout = true; + + // Update Registry Configuration following successful login + self.nfRegistryApi.getRegistryConfig().subscribe(function (registryConfig) { + self.nfRegistryService.registry.config = registryConfig; + }); } // redirect to explorer perspective if not admin @@ -303,6 +313,11 @@ NfRegistryLoginAuthGuard.prototype = { // render the logout button if there is a token locally if (self.nfStorage.getItem('jwt') !== null) { self.nfRegistryService.currentUser.canLogout = true; + + // Update Registry Configuration following successful login + self.nfRegistryApi.getRegistryConfig().subscribe(function (registryConfig) { + self.nfRegistryService.registry.config = registryConfig; + }); } self.nfRegistryService.currentUser.canActivateResourcesAuthGuard = true; resolve(false); @@ -382,6 +397,11 @@ NfRegistryResourcesAuthGuard.prototype = { if (self.nfStorage.hasItem('jwt')) { self.nfRegistryService.currentUser.canLogout = true; self.nfRegistryService.currentUser.canActivateResourcesAuthGuard = true; + + // Update Registry Configuration following successful login + self.nfRegistryApi.getRegistryConfig().subscribe(function (registryConfig) { + self.nfRegistryService.registry.config = registryConfig; + }); resolve(true); } else { self.router.navigateByUrl('login');