Fix: Remove userId/username injection from screen render params
The username parameter was being injected into screen render params, which conflicted with FindCustomer's 'username' search field. This caused the screen to filter results to only show customers with username matching the current user (john.sales*), returning 0 results. User context is already available via ec.user for authorization purposes, so injecting these params was redundant and harmful.
Showing
1 changed file
with
3 additions
and
2 deletions
| ... | @@ -1418,8 +1418,9 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) | ... | @@ -1418,8 +1418,9 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) |
| 1418 | .auth(ec.user.username) | 1418 | .auth(ec.user.username) |
| 1419 | 1419 | ||
| 1420 | def renderParams = parameters ?: [:] | 1420 | def renderParams = parameters ?: [:] |
| 1421 | renderParams.userId = ec.user.userId | 1421 | // Note: Don't inject userId/username into renderParams as they may conflict with |
| 1422 | renderParams.username = ec.user.username | 1422 | // screen search fields (e.g., FindCustomer has a 'username' search field). |
| 1423 | // User context is already available via ec.user for authorization purposes. | ||
| 1423 | 1424 | ||
| 1424 | // Build the screen path - append action/transition if specified | 1425 | // Build the screen path - append action/transition if specified |
| 1425 | // This lets the framework handle transition execution properly (inheritance, pre/post actions, etc.) | 1426 | // This lets the framework handle transition execution properly (inheritance, pre/post actions, etc.) | ... | ... |
-
Please register or sign in to post a comment