Adjust PrivMX policy to fix crashes in app's task list screen#35
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses crashes in the app's task list screen by adjusting the PrivMX policy configuration. Key changes include:
- Adding a default PrivMxPolicy to the context creation process in PrivMxService.
- Incorporating a new "policy" field in the PrivMxCreateContextParameters to accept policy data.
- Introducing new policy model classes for thread and thread items to standardize policy structure.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| FamilyVaultServer/Services/PrivMx/PrivMxService.cs | Adds default PrivMxPolicy assignment during context creation. |
| FamilyVaultServer/Services/PrivMx/Models/Parameters/PrivMxCreateContextParameters.cs | Includes a new JSON-mapped policy field for input parameters. |
| FamilyVaultServer/Models/PrivMxPolicy/PrivMxThreadPolicy.cs | Introduces a thread-level policy class. |
| FamilyVaultServer/Models/PrivMxPolicy/PrivMxThreadItemPolicy.cs | Defines a default update policy for thread items. |
| FamilyVaultServer/Models/PrivMxPolicy/PrivMxPolicy.cs | Provides a composite policy structure by composing thread policies. |
| [JsonPropertyName("scope")] | ||
| public required string Scope { get; set; } | ||
| [JsonPropertyName("policy")] | ||
| public PrivMxPolicy Policy = new PrivMxPolicy(); |
There was a problem hiding this comment.
[nitpick] Consider converting the public field 'Policy' into a property with { get; set; } for consistency and to align with common patterns used for other request parameters.
Suggested change
| public PrivMxPolicy Policy = new PrivMxPolicy(); | |
| public PrivMxPolicy Policy { get; set; } = new PrivMxPolicy(); |
| { | ||
| public class PrivMxThreadItemPolicy | ||
| { | ||
|
|
There was a problem hiding this comment.
[nitpick] Adding XML documentation comments for the 'Update' field would help clarify the intended behavior and expected values, aiding maintainability and clarity for API consumers.
Suggested change
| /// <summary> | |
| /// Specifies the update policy for the thread item. | |
| /// </summary> | |
| /// <value> | |
| /// The default value is "all", which indicates that all updates are allowed. | |
| /// Other possible values may depend on the specific implementation. | |
| /// </value> |
pawl0wski
approved these changes
May 7, 2025
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.
No description provided.