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

[FEATURE] Disallow content elements in all containers #508

Closed
wants to merge 1 commit into from

Conversation

saitho
Copy link
Contributor

@saitho saitho commented Jun 11, 2024

A new method "Registry::addDisallowedCType" is added that allows excluding content elements from all
containers per default (if Ext:content_defender is installed).

However, content elements excluded in such a way can still be explicitly allowed via "allowed" setting in column configuration.

Note: The method needs to be called in ext_localconf.php, in order to work correctly, not in TCA.

Resolves: #507

@saitho saitho marked this pull request as draft June 11, 2024 11:52
@saitho saitho force-pushed the task/global_disallow branch 2 times, most recently from 1499935 to b4d804b Compare June 11, 2024 12:04
A new method "Registry::addDisallowedCType" is added
that allows excluding content elements from all
containers per default (if Ext:content_defender is installed).

However, content elements excluded in such a way can still be explicitly allowed via "allowed" setting in column configuration.

Note: In order to take effect on the whole TYPO3 system, the method needs to be called in ext_localconf.php.

Resolves: b13#507
@saitho saitho marked this pull request as ready for review June 11, 2024 13:07
@saitho
Copy link
Contributor Author

saitho commented Jun 11, 2024

Not sure about the failing test though. I don't think I have touched that line...
RegistryTest works fine on my machine 🤔

@achimfritz
Copy link
Contributor

thanks for PR, but IMHO this is as pecial case which will bloat the code unnecessary. We have introduce 2 new Events in the current master branch (f9b4e2a). You should be able to solve your requirement listening to the BeforeContainerConfigurationIsAppliedEvent

@saitho
Copy link
Contributor Author

saitho commented Oct 22, 2024

Thanks, looking good. I'll try that.

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.

Registry: Global disallow setting
2 participants