Skip to content

Commit

Permalink
Merge pull request #2495 from arun-s-aot/bugfix/current-user-role-val…
Browse files Browse the repository at this point in the history
…ue-setting

[Bugfix] currentUserRoles data to be fetched from groups variable from 'userDetails' localstorage instead of roles variable
  • Loading branch information
arun-s-aot authored Jan 9, 2025
2 parents a3dc004 + e95d937 commit 9e1a963
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion forms-flow-web/src/constants/applicationComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export const addHiddenApplicationComponent = (form) => {
label: "Current User Roles",
persistent: true,
key: "currentUserRole",
customDefaultValue: "const localdata = localStorage.getItem('UserDetails') && JSON.parse(localStorage.getItem('UserDetails')); value = localdata?.role || [];"
customDefaultValue: "const localdata = localStorage.getItem('UserDetails') && (JSON.parse(localStorage.getItem('UserDetails'))) || []; value = localdata?.groups?.map(group => group.replace(new RegExp('^/+|/+$', 'g'), '')) || [];"
},
// {
// label: "All Available Roles",
Expand Down

0 comments on commit 9e1a963

Please sign in to comment.