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
Hide creator fields from public api by default #8052
Conversation
5cfa0fc
to
4431cf3
Compare
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.
Should move docs to the v3 not v3-beta
Codecov Report
@@ Coverage Diff @@
## master #8052 +/- ##
==========================================
+ Coverage 32.71% 32.77% +0.05%
==========================================
Files 1194 1197 +3
Lines 12969 13019 +50
Branches 1280 1286 +6
==========================================
+ Hits 4243 4267 +24
- Misses 7886 7907 +21
- Partials 840 845 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
β¦i controller (find) Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
β¦ builds) Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
5476f76
to
7288941
Compare
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
7288941
to
5fcf64f
Compare
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.
Last comment :)
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
β¦t.js) Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
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.
Docs look fine to me
Hi @Convly, I was looking at the files that were changed with this PR and I saw something strange. strapi/packages/strapi-utils/lib/__tests__/sanitize-entity.test.js Lines 38 to 43 in dbfde36
Correct me if I'm wrong, but I thought the strapi/packages/strapi-utils/lib/__tests__/sanitize-entity.test.js Lines 82 to 87 in dbfde36
strapi/packages/strapi-utils/lib/__tests__/sanitize-entity.test.js Lines 206 to 213 in dbfde36
Is there something I'm missing here? |
Hello @dalbitresb12 The In the tests, we simulate the result of the |
Oh, so this is just a calculated value that Strapi uses internally? It is not one that us as developers should add manually? |
Exactly π |
That's actually great. Thank you for clarifying this. π |
This pull request has been mentioned on Strapi Community. There might be relevant details there: |
β What has been done?
π Removed the creator's fields (
updated_by
,created_by
) by default from public API responses.π§ Added a model option to populate and return the creator's fields in public API responses (
populateCreatorFields
)β Added new utilities to centralize checks on the attribute's privacy.
π Removed the creator's fields from upload's controller routes.
π Fixed GraphQL behavior with privates attributes (removed computed private attributes from resolvers generation)
ποΈ Notes
@alexandrebodin, @petersg83, I went with
populateCreatorFields
as the name of the model option but any feedback or suggestion is welcomeresolve #7177
resolve #8069