You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pe...@apache.org on 2018/12/29 07:24:37 UTC

[ranger] branch master updated: RANGER-2311 After the user profile is updated, the page still displays the original information.

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

pengjianhua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new 38bb3b3  RANGER-2311 After the user profile is updated, the page still displays the original information.
38bb3b3 is described below

commit 38bb3b3fc726e5e7e4f6c315c1c421a678932c0b
Author: zhangqiang2 <zh...@zte.com.cn>
AuthorDate: Fri Dec 21 14:40:30 2018 +0800

    RANGER-2311 After the user profile is updated, the page still displays the original information.
    
    Signed-off-by: peng.jianhua <pe...@zte.com.cn>
---
 security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js        | 7 +++++++
 security-admin/src/main/webapp/scripts/views/user/UserProfile.js | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js b/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js
index 35b48cb..0d27688 100644
--- a/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js
+++ b/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js
@@ -49,6 +49,13 @@ define(function(require){
 		return vXPortalUser;
 	};
 
+	SessionMgr.updateUserProfile = function() {
+		if (vXPortalUser){
+			vXPortalUser.getUserProfile({async : false,cache:false}).done(function(data){
+				vXPortalUser.set(data);
+			});
+		}
+	};
 
 	SessionMgr.getLoginId = function() {
 		if (vXPortalUser) {
diff --git a/security-admin/src/main/webapp/scripts/views/user/UserProfile.js b/security-admin/src/main/webapp/scripts/views/user/UserProfile.js
index 408b311..7ccd5f8 100644
--- a/security-admin/src/main/webapp/scripts/views/user/UserProfile.js
+++ b/security-admin/src/main/webapp/scripts/views/user/UserProfile.js
@@ -28,6 +28,7 @@ define(function(require){
 	var XAEnums			= require('utils/XAEnums');
 	var XALinks 		= require('modules/XALinks');
 	var localization	= require('utils/XALangSupport');
+	var SessionMgr		= require('mgrs/SessionMgr');
 
 	var VPasswordChange	= require("models/VXPasswordChange");
 	var UserProfileForm = require('views/user/UserProfileForm');
@@ -121,6 +122,7 @@ define(function(require){
 				wait: true,
 				success: function () {
 					XAUtil.notifySuccess('Success', "User profile updated successfully !!");
+					SessionMgr.updateUserProfile();
 					App.appRouter.navigate("#!/policymanager/resource",{trigger: true});
 					Communicator.vent.trigger('ProfileBar:rerender');
 				},