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

refactor(content-releases): remove permission checks and update endpo… #19006

Merged

Conversation

markkaylor
Copy link
Contributor

@markkaylor markkaylor commented Dec 7, 2023

What does it do?

Release Action

  • Removes the permission checks on entry and filtering of entries that don't pass the permission check
  • Reshapes the populated entry to use a meta entry meta data (content type display name, locale)
//...release action stuff...//
"entry": {
    "contentType": {
        "mainFieldValue": "name",
        "displayName": "Restaurant"
    },
    "locale": {
        "name": "English (en)",
        "code": "en"
    }
}

Release findOne

  • Forward the query from the controller to the service so the pagination works
  • Update the findOne service to populate and sanitize creator fields
// ... release stuff ... //
"createdBy": {
  "id": 1,
  "firstname": "George",
  "lastname": "Harrison",
  "username": "Thebestbeatle",
},

Why is it needed?

  • We decided for now to not check permissions on every single entry. We may re-introduce granular permission checks in the future.
  • Gives the frontend all the data it needs for the Release page

How to test it?

@markkaylor markkaylor self-assigned this Dec 7, 2023
@markkaylor markkaylor force-pushed the content-releases/refactor-actions branch from 1b1b81b to 55b8f21 Compare December 11, 2023 14:58
@markkaylor markkaylor marked this pull request as ready for review December 11, 2023 14:59
Copy link
Contributor

@Feranchz Feranchz left a comment

Choose a reason for hiding this comment

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

Tested locally and it's working great. There is one small lint error to fix

@markkaylor markkaylor force-pushed the content-releases/refactor-actions branch from ecb8915 to bb72bb1 Compare December 12, 2023 08:29
@markkaylor markkaylor force-pushed the content-releases/refactor-actions branch from bb72bb1 to 1cb1420 Compare December 12, 2023 08:58
@markkaylor markkaylor merged commit 5bfbd8c into feature/content-releases Dec 12, 2023
19 of 21 checks passed
@markkaylor markkaylor deleted the content-releases/refactor-actions branch December 12, 2023 09:43
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.

None yet

2 participants