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.
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
[PM-13014] - Add CanToggleStatus property to PolicyRepsonseModel based on Policy Validators #4940
base: main
Are you sure you want to change the base?
[PM-13014] - Add CanToggleStatus property to PolicyRepsonseModel based on Policy Validators #4940
Changes from all commits
d2c6e2b
55d1d96
af262c4
6f5ce9d
dfa3f98
65fe1e0
1b0e4d7
82aac75
9007556
2503021
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 82 in src/Api/AdminConsole/Controllers/PoliciesController.cs
Codecov / codecov/patch
src/Api/AdminConsole/Controllers/PoliciesController.cs#L81-L82
Check warning on line 99 in src/Api/AdminConsole/Controllers/PoliciesController.cs
Codecov / codecov/patch
src/Api/AdminConsole/Controllers/PoliciesController.cs#L99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes required, but I am interested in the decision to use an extension method here vs. a static method on the class itself. I can make some guesses but would like to hear your thoughts.
Check warning on line 11 in src/Api/AdminConsole/Models/Response/Helpers/PolicyDetailResponses.cs
Codecov / codecov/patch
src/Api/AdminConsole/Models/Response/Helpers/PolicyDetailResponses.cs#L11
Check warning on line 14 in src/Api/AdminConsole/Models/Response/Helpers/PolicyDetailResponses.cs
Codecov / codecov/patch
src/Api/AdminConsole/Models/Response/Helpers/PolicyDetailResponses.cs#L13-L14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the bool needs to be inverted:
(Probably a drawback of a bool that defaults to
true
, I didn't realise that when I suggested the naming. But no need to spend more time on it.)Check warning on line 18 in src/Api/AdminConsole/Models/Response/Helpers/PolicyDetailResponses.cs
Codecov / codecov/patch
src/Api/AdminConsole/Models/Response/Helpers/PolicyDetailResponses.cs#L17-L18
Check warning on line 44 in src/Api/AdminConsole/Public/Controllers/PoliciesController.cs
Codecov / codecov/patch
src/Api/AdminConsole/Public/Controllers/PoliciesController.cs#L44
Check warning on line 50 in src/Api/AdminConsole/Public/Controllers/PoliciesController.cs
Codecov / codecov/patch
src/Api/AdminConsole/Public/Controllers/PoliciesController.cs#L50
Check warning on line 65 in src/Api/AdminConsole/Public/Controllers/PoliciesController.cs
Codecov / codecov/patch
src/Api/AdminConsole/Public/Controllers/PoliciesController.cs#L65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Api request/response models live in the
Api
project.Check warning on line 14 in src/Core/AdminConsole/Models/Api/Response/PolicyDetailResponseModel.cs
Codecov / codecov/patch
src/Core/AdminConsole/Models/Api/Response/PolicyDetailResponseModel.cs#L11-L14
Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/SingleOrgPolicyValidator.cs
Codecov / codecov/patch
src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/SingleOrgPolicyValidator.cs#L113-L114