Skip to content

Commit 2e3c8bf

Browse files
fimugdhamneethiraj
authored andcommitted
RANGER-4737 : The inactivityTimeout is getting reset when user updates its profile from UserProfile page
Signed-off-by: Dhaval.Rajpara <[email protected]> (cherry picked from commit d793c59)
1 parent 9a23bcd commit 2e3c8bf

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

security-admin/src/main/webapp/react-webapp/src/views/UserGroupRoleListing/users_details/UserFormComp.jsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ import {
3232
} from "Utils/XAEnums";
3333
import { toast } from "react-toastify";
3434
import { getUserAccessRoleList, serverError } from "Utils/XAUtils";
35-
import { getUserProfile } from "Utils/appState";
36-
import { has, isEmpty, isUndefined } from "lodash";
35+
import { getUserProfile, setUserProfile } from "Utils/appState";
36+
import { cloneDeep, has, isEmpty, isUndefined } from "lodash";
3737
import { SyncSourceDetails } from "../SyncSourceDetails";
3838
import { BlockUi } from "../../../components/CommonComponents";
3939
import { InfoIcon } from "../../../utils/XAUtils";
@@ -112,6 +112,15 @@ function UserFormComp(props) {
112112
type: "SET_BLOCK_UI",
113113
blockUI: false
114114
});
115+
116+
const userProps = cloneDeep(getUserProfile());
117+
if (userProps.loginId == userInfo.name) {
118+
userProps.firstName = userEditData.firstName;
119+
userProps.emailAddress = userEditData.emailAddress;
120+
userProps.lastName = userEditData.lastName;
121+
122+
setUserProfile(userProps);
123+
}
115124
toast.success("User updated successfully!!");
116125
navigate("/users/usertab");
117126
} catch (error) {

security-admin/src/main/webapp/react-webapp/src/views/UserProfile.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class UserProfile extends Component {
5555
skipNavigate: true
5656
});
5757
this.setState({ blockUI: false });
58+
if (has(profResp, "data")) {
59+
profResp.data["configProperties"] = userProps.configProperties;
60+
}
5861
setUserProfile(profResp.data);
5962
this.props.navigate("/");
6063
toast.success("Successfully updated user profile");

0 commit comments

Comments
 (0)