Fix unintended boolean values clearing in update commands#1442
Open
bkiran6398 wants to merge 12 commits intomainfrom
Open
Fix unintended boolean values clearing in update commands#1442bkiran6398 wants to merge 12 commits intomainfrom
bkiran6398 wants to merge 12 commits intomainfrom
Conversation
…sfer - Added logic to set inputs.CanCreateToken based on the current session transfer state when the appSTCanCreateToken flag is not set. - Removed redundant code that set CanCreateSessionTransferToken only if the flag was supplied or prompted.
…hed password detection update command - Added logic to set the Enabled input based on the current state of the breached password detection flags if the flag is not explicitly set in the command. - This change ensures that the command behaves correctly by maintaining the previous state of the Enabled setting when the user does not provide an input.
… force protection update command - Added a check to set the Enabled input based on the current state of the brute force protection flags if it is not explicitly set by the user. - This change ensures that the command behaves correctly when the Enabled flag is not provided, improving the user experience and preventing potential misconfigurations.
…cious IP throttling update - Added a check to set the Enabled flag from the current state if it is not explicitly set in the command. - This change ensures that the existing state is preserved when updating suspicious IP throttling settings. - The modification occurs in the `updateSuspiciousIPThrottlingCmdRun` function.
…emplate update - Added a check to set the Enabled flag based on the old template's value if the user does not specify it during the update command. - This ensures that the previous state of the template is preserved when updating, preventing unintended changes to the Enabled status.
…e Enabled/Disabled flags are set correctly - Updated `updateEmailProviderCmd`, `updateLogStreamsSplunkCmd`, `updateBrandingPhoneProviderCmd`, and `updateRuleCmd` functions to set the Enabled/Disabled flags based on existing provider values when not explicitly set by the user. - This change ensures that the current state of the providers is preserved during updates, improving user experience and preventing unintended changes.
ramya18101
requested changes
Feb 17, 2026
Contributor
|
Update testcases with the scenarios..! |
…s to ensure consistency - Affected functions include: - appsSessionTransferUpdateCmd - updateEmailProviderCmd - updateEmailTemplateCmd - updateLogStreamsSplunkCmd - updateBrandingPhoneProviderCmd - updateRuleCmd
…remain intact - Added tests to verify that updating specific values does not affect the boolean flags for session transfer, email provider, log streams, and phone provider. - Ensured that the `can_create_session_transfer_token`, `enabled`, `sink.splunkSecure`, and `disabled` flags retain their values after updates. - Updated the following test cases: - apps-test-cases.yaml - email-test-cases.yaml - logs-test-cases.yaml - phone-test-cases.yaml
- Uncommented existing rules test cases. - Ensured that the 'enabled' boolean flag is correctly set and maintained across various operations.
- Updated test case to verify that the disabled boolean flag remains unchanged when updating the phone provider configuration.
…in intact" This reverts commit b4a649d.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Changes
Fixes boolean flag preservation across 9 update commands to prevent unintended state changes when updating resources.
Problem: When updating CLI resources without explicitly setting boolean flags (but explicitly setting any other value in flag), the existing boolean state was not unintentionally clearing.
Solution: Added checks before
AskBoolUcalls to preserve current state when flags are not explicitly set by the user.Commands Fixed:
auth0 apps session-transfer update- CanCreateToken flagauth0 protection breached-password-detection update- Enabled flagauth0 protection brute-force-protection update- Enabled flagauth0 protection suspicious-ip-throttling update- Enabled flagauth0 email-provider update- Enabled flagauth0 email-templates update- Enabled flagauth0 log-streams splunk update- Secure flagauth0 phone-provider update- Disabled flagauth0 rules update- Enabled flag📚 References
🔬 Testing
Automated Testing:
Manual Testing:
📝 Checklist