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

Add privateAttributes to global and per model response #7330

Closed
wants to merge 6 commits into from
Closed

Add privateAttributes to global and per model response #7330

wants to merge 6 commits into from

Conversation

dalbitresb12
Copy link
Contributor

Description of what you did:

Restarting the work made from PR's #6002 and #4914. Also added the option to ignore the global private attributes per model using options.ignoreGlobalPrivateAttributes. Finally, new tests were added for sanitizeEntity.

Fixes #4342.

@codecov
Copy link

codecov bot commented Aug 5, 2020

Codecov Report

Merging #7330 into master will increase coverage by 0.07%.
The diff coverage is 51.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7330      +/-   ##
==========================================
+ Coverage   26.17%   26.24%   +0.07%     
==========================================
  Files        1130     1131       +1     
  Lines       15415    15434      +19     
  Branches     2439     2443       +4     
==========================================
+ Hits         4035     4051      +16     
- Misses       9561     9563       +2     
- Partials     1819     1820       +1     
Flag Coverage Δ
#front 18.26% <0.00%> (-0.01%) ⬇️
#unit 53.21% <100.00%> (+0.24%) ⬆️

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 65.07% <100.00%> (+3.78%) ⬆️
packages/strapi/lib/services/metrics/sender.js 100.00% <100.00%> (ø)
... and 1 more

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...a44bcd8. Read the comment docs.

@dalbitresb12
Copy link
Contributor Author

Sorry, I forgot to sign for DCO. Force-pushing didn't seem to work, so I opened a new PR: #7331.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide / make private timestamps, _id, id and __v with MongoDB
1 participant