Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add deny access functionality #34

Merged
merged 6 commits into from
Oct 4, 2024
Merged

Add deny access functionality #34

merged 6 commits into from
Oct 4, 2024

Conversation

AnderssonPeter
Copy link
Contributor

  • Added logic to stop JsonPatch from using accessing specific properties
  • Added documentation for DenyPatch
  • Added editorconfig file and ensure that we use tabs instead of spaces
  • Added unit tests

Resolves ##33


private static void EnsureAccessToProperty(PropertyInfo propertyInfo)
{
if (propertyInfo.GetCustomAttribute(typeof(DenyPatchAttribute), true) != null)
Copy link
Owner

Choose a reason for hiding this comment

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

Wasn't there also generic overload propertyInfo.GetCustomAttribute<DenyPatchAttribute>(...) `?

Copy link
Owner

Choose a reason for hiding this comment

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

Its not a big deal anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes there is, but i don't think it exists in netstandard2.0.

@Havunen
Copy link
Owner

Havunen commented Oct 4, 2024

The changes looks good to me. Thank you!

@Havunen Havunen merged commit 7fc8215 into Havunen:main Oct 4, 2024
3 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants