-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(app): Sub-parties sometimes missing from authorized parties #1534
Conversation
📝 WalkthroughWalkthroughThe pull request introduces changes to two files: the Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🧰 Additional context used🪛 Biome (1.9.4)src/Digdir.Domain.Dialogporten.GraphQL/appsettings.test.json[error] 45-62: End of file expected Use an array for a sequence of values: (parse) [error] 62-63: End of file expected Use an array for a sequence of values: (parse) 🔇 Additional comments (2)src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs (2)
The code has been simplified by directly using the
The change fixes the issue of missing sub-parties by preserving them during the flattening process. This aligns with the PR objective to fix sub-parties sometimes missing from authorized parties. However, let's verify there are no unintended side effects from this change: ✅ Verification successfulVerified: No side effects from preserving sub-parties The code inspection shows that SubParties are only used within the flattening process itself to traverse the hierarchy and set parent relationships. After the traversal, the flattened parties are added to a separate collection ( 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if any code relies on sub-parties being empty after flattening
# Search for code that might expect empty sub-parties
rg -l "SubParties\W*(==|!=)\W*(\[\]|null|empty)"
# Search for size/length checks on SubParties
rg -l "SubParties\W*(\.Count|\.Length|\.Size|\.Empty)"
# Search for iterations over SubParties
rg -l "foreach.*SubParties"
Length of output: 329 Script: #!/bin/bash
# Let's examine the specific usage of SubParties in the file
rg -A 5 -B 5 "SubParties" src/Digdir.Domain.Dialogporten.Infrastructure/Altinn/Authorization/AltinnAuthorizationClient.cs
Length of output: 859 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
🤖 I have created a release *beep* *boop* --- ## [1.40.0](v1.39.0...v1.40.0) (2024-11-26) ### Features * **infra:** Upgrade to PostgreSQL v16 ([#1521](#1521)) ([c67dc27](c67dc27)), closes [#1520](#1520) ### Bug Fixes * **app:** Sub-parties sometimes missing from authorized parties ([#1534](#1534)) ([f47112e](f47112e)) * Don't rethrow deserialization exceptions from FusionCache ([#1535](#1535)) ([790feb8](790feb8)) * Use service resource org, allow admin-scope to fetch/update dialogs ([#1529](#1529)) ([25277b5](25277b5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Description
Related Issue(s)
Verification
Documentation
docs
-directory, Altinnpedia or a separate linked PR in altinn-studio-docs., if applicable)Summary by CodeRabbit
Bug Fixes
Chores