Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-8075: User (group) re-selection not possible after failed role assignment #1244

Merged
merged 2 commits into from
Apr 19, 2024

Conversation

tischsoic
Copy link
Contributor

@tischsoic tischsoic commented Apr 15, 2024

🎫 Issue IBX-8075

@tischsoic tischsoic force-pushed the IBX-8075-fix-role-assignment-UDW-crash branch from 9a7ec2d to 280fab4 Compare April 15, 2024 13:53
{% set items_map = form.users.vars.data|reduce((output, user) => output|merge({
"{{user.content.versionInfo.contentInfo.id}}": user.id
}), {}) %}
{% set items_map = form.users.vars.data|reduce((output, user) => output + {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: We have to use + to avoid numerical indexes reset caused by |merge
ref. twigphp/Twig#2741 (comment)

"{{user.content.versionInfo.contentInfo.id}}": user.id
}), {}) %}
{% set items_map = form.users.vars.data|reduce((output, user) => output + {
(user.content.versionInfo.contentInfo.id): user.id,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: “{{ some_variable }}“ solution does not work, variable should be surrounded with parentheses.

Copy link

sonarcloud bot commented Apr 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dew326 dew326 merged commit 35f04ce into 4.6 Apr 19, 2024
22 checks passed
@dew326 dew326 deleted the IBX-8075-fix-role-assignment-UDW-crash branch April 19, 2024 12:25
@tischsoic
Copy link
Contributor Author

Merged up:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants