You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ab...@apache.org on 2020/04/01 15:34:05 UTC

[nifi-registry] 03/06: [NIFIREG-374] reload nifi registry config upon successful login

This is an automated email from the ASF dual-hosted git repository.

aboda pushed a commit to branch NIFIREG-371-RC1
in repository https://gitbox.apache.org/repos/asf/nifi-registry.git

commit 7007c4aa1ee36bb92ea62aab4a3d65745787dfe2
Author: Scott Aslan <sc...@gmail.com>
AuthorDate: Fri Mar 20 15:37:46 2020 -0400

    [NIFIREG-374] reload nifi registry config upon successful login
    
    Signed-off-by: Nathan Gough <th...@gmail.com>
    
    This closes #269.
---
 .../webapp/components/login/dialogs/nf-registry-user-login.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js b/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js
index d4da84c..e9c024e 100644
--- a/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js
+++ b/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/login/dialogs/nf-registry-user-login.js
@@ -53,10 +53,13 @@ NfRegistryUserLogin.prototype = {
         var self = this;
         this.nfRegistryApi.postToLogin(username.value, password.value).subscribe(function (response) {
             if (response || response.status === 200) {
-                //successful login
-                self.dialogRef.close();
-                self.nfRegistryService.currentUser.anonymous = false;
-                self.nfRegistryLoginAuthGuard.checkLogin(self.nfRegistryService.redirectUrl);
+                //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);
+                });
             }
         });
     },