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

Whitelist feature #126

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Whitelist feature #126

wants to merge 3 commits into from

Conversation

roelofelgentos
Copy link
Contributor

@roelofelgentos roelofelgentos commented Jan 23, 2025

Webshops using Prismic expose many content through the direct page controller by type. This creates an endpoint that is publicly accessible, even when it doesn’t need to be. To address this, we should implement a filter to control which document types are exposed externally.

added extra config options:

  • enable whitelist
  • whitelist content types selection

By default, this feature is disabled.

@roelofelgentos roelofelgentos self-assigned this Jan 23, 2025
@peterjaap
Copy link
Contributor

I'm missing some documentation/comments on what this feature exactly does and why it is needed?

private readonly ScopeConfigInterface $scopeConfig,
private readonly StoreManagerInterface $storeManager
) {
$this->contentTypes = explode(',', $this->scopeConfig->getValue(
Copy link

Choose a reason for hiding this comment

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

The loading of these configuration lives in the src/Model/Configuration.php

@roelofelgentos
Copy link
Contributor Author

I'm missing some documentation/comments on what this feature exactly does and why it is needed?

It's about the issue below for which we need the feature. I have also updated the comments in the Pull Request.

https://gitlab.elgentos.nl/dutchlabelshop/magento2/-/issues/2806

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.

3 participants