Skip to content
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 sanitizeEntity's includeFields usage #7350

Merged
merged 1 commit into from Aug 7, 2020
Merged

Fix sanitizeEntity's includeFields usage #7350

merged 1 commit into from Aug 7, 2020

Conversation

Convly
Copy link
Member

@Convly Convly commented Aug 6, 2020

Fix #7335

In sanitizeEntity, setting includeFields to null should indicates "all fields".
It was not the case before thus creating issues with allowedFieldsHasKey checks for dynamic zones.

@Convly Convly added issue: bug Issue reporting a bug source: core:strapi Source is core/strapi package labels Aug 6, 2020
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
@codecov
Copy link

codecov bot commented Aug 6, 2020

Codecov Report

Merging #7350 into master will increase coverage by 0.05%.
The diff coverage is 51.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7350      +/-   ##
==========================================
+ Coverage   26.17%   26.22%   +0.05%     
==========================================
  Files        1130     1131       +1     
  Lines       15415    15433      +18     
  Branches     2439     2443       +4     
==========================================
+ Hits         4035     4048      +13     
- Misses       9561     9565       +4     
- Partials     1819     1820       +1     
Flag Coverage Δ
#front 18.26% <0.00%> (-0.01%) ⬇️
#unit 53.14% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...s/strapi-admin/admin/src/containers/Admin/index.js 63.82% <ø> (ø)
...admin/admin/src/containers/Roles/EditPage/index.js 2.77% <0.00%> (-0.80%) ⬇️
...admin/admin/src/containers/Roles/ListPage/index.js 0.00% <0.00%> (ø)
...ermissions/admin/src/components/PopUpForm/index.js 0.00% <0.00%> (ø)
packages/strapi-admin/services/metrics.js 100.00% <100.00%> (ø)
packages/strapi-admin/services/role.js 94.11% <100.00%> (+0.14%) ⬆️
packages/strapi-admin/services/user.js 82.56% <100.00%> (+0.66%) ⬆️
packages/strapi-utils/lib/sanitize-entity.js 61.29% <100.00%> (ø)
packages/strapi/lib/services/metrics/sender.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7113f7f...10cc543. Read the comment docs.

Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug source: core:strapi Source is core/strapi package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Private fields of components are show in response
2 participants