Skip to content

Fix editing of policy subjects and environments#199

Merged
pavelhoral merged 1 commit intoWrenSecurity:mainfrom
krausvo1:policy_edit_fix
Jun 13, 2025
Merged

Fix editing of policy subjects and environments#199
pavelhoral merged 1 commit intoWrenSecurity:mainfrom
krausvo1:policy_edit_fix

Conversation

@krausvo1
Copy link
Copy Markdown
Contributor

@krausvo1 krausvo1 commented Jun 11, 2025

Some of the previous wrensec-ui ugprades contains upgrade of jQuery (from 2.x to 3.x), which broke edit Policy page, specifically Subjects and Environments sections (see issue #200) I believe the issue are jQuery's Deferred behavior changes (see https://jquery.com/upgrade-guide/3.0/#deferred):

Another behavior change required for Promises/A+ compliance is that Deferred .then() callbacks are always called asynchronously. Previously, if a .then() callback was added to a Deferred that was already resolved or rejected, the callback would run immediately and synchronously.

I believe this broke the mentioned sections where we assumed rendering of condition views was synchronous.

This PR fixes the mentioned sections. During my testing I have found some minor issues caused by invalid setting of subjects and environments. These issues were present before mentioned wrensec-ui upgrade, I didn't fix all of them in this PR.

Recording of the fixed sections:
https://github.com/user-attachments/assets/55d78cae-c52e-425e-bd95-fb463f2834f1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These changes fix usage of jQuery Deferred methods after upgrade from 2.x to 3.x.

Copy link
Copy Markdown
Member

@pavelhoral pavelhoral left a comment

Choose a reason for hiding this comment

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

LGTM

@pavelhoral pavelhoral merged commit 50c786a into WrenSecurity:main Jun 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants