diff --git a/admin-ui/plugins/user-management/components/UserManagement/UserAddPage.js b/admin-ui/plugins/user-management/components/UserManagement/UserAddPage.js index 9ebd2e247..8ee5de0e7 100644 --- a/admin-ui/plugins/user-management/components/UserManagement/UserAddPage.js +++ b/admin-ui/plugins/user-management/components/UserManagement/UserAddPage.js @@ -62,7 +62,7 @@ function UserAddPage() { } } - const submitData = (values) => { + const submitData = (values, modifiedFields, message) => { let customAttributes = createCustomAttributes(values) let submitableValues = { userId: values.userId || '', @@ -72,6 +72,7 @@ function UserAddPage() { userPassword: values.userPassword || '', givenName: values.givenName || '', customAttributes: customAttributes, + action_message: message, } dispatch(createUser(submitableValues)) } diff --git a/admin-ui/plugins/user-management/components/UserManagement/UserForm.js b/admin-ui/plugins/user-management/components/UserManagement/UserForm.js index 17e22b088..40a1f1db2 100644 --- a/admin-ui/plugins/user-management/components/UserManagement/UserForm.js +++ b/admin-ui/plugins/user-management/components/UserManagement/UserForm.js @@ -117,7 +117,7 @@ function UserForm({ onSubmitData }) { const submitForm = (usermessage) => { toggle(); - onSubmitData(formik.values, modifiedFields,usermessage); + onSubmitData(formik.values, modifiedFields, usermessage); }; const loading = useSelector((state) => state.userReducer.loading); const setSelectedClaimsToState = (data) => { diff --git a/admin-ui/plugins/user-management/components/UserManagement/UserList.js b/admin-ui/plugins/user-management/components/UserManagement/UserList.js index 622c1591c..0f4952467 100644 --- a/admin-ui/plugins/user-management/components/UserManagement/UserList.js +++ b/admin-ui/plugins/user-management/components/UserManagement/UserList.js @@ -68,8 +68,9 @@ function UserList(props) { const [userDetails, setUserDetails] = useState(false); const [deleteData, setDeleteData] = useState(null); const toggle = () => setModal(!modal); - const submitForm = () => { + const submitForm = (message) => { toggle(); + deleteData.action_message = message; handleUserDelete(deleteData); }; const theme = useContext(ThemeContext); diff --git a/admin-ui/plugins/user-management/redux/sagas/UserSaga.js b/admin-ui/plugins/user-management/redux/sagas/UserSaga.js index 01a4bcb48..a06b2782e 100644 --- a/admin-ui/plugins/user-management/redux/sagas/UserSaga.js +++ b/admin-ui/plugins/user-management/redux/sagas/UserSaga.js @@ -53,7 +53,9 @@ export function* createUserSaga({ payload }) { yield* triggerWebhook({ payload: { createdFeatureValue: data } }); addAdditionalData(audit, CREATE, API_USERS, payload); - audit.message = payload.action?.action_message || ``; + audit.message = payload?.action_message || ``; + + delete payload.userPassword yield call(postUserAction, audit); return data; } catch (e) { @@ -163,7 +165,7 @@ export function* deleteUserSaga({ payload }) { yield* triggerWebhook({ payload: { createdFeatureValue: payload } }); addAdditionalData(audit, DELETION, API_USERS, payload); - audit.message = `Deleted user ${payload.inum}`; + audit.message = payload.action_message || ``; yield call(postUserAction, audit); return data; } catch (e) {