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

BUGFIX: Hide inaccessible backend modules #2855

Merged

Conversation

@bwaidelich
Copy link
Member

bwaidelich commented Jan 6, 2020

Adds a ViewHelper ifModuleAccessible that allows to evaluate whether a
given (sub) module is accessible to the currently authenticated user and
uses that ViewHelper in the SubmoduleOverview partial in order to hide
inaccessible modules from the module overview.

Background:

With #964 the module.<submodule>.privilegeTarget configuration became
deprecated in favor of ModulePrivileges but the partial only checked
the "privilegeTarget" configuration.

Note: This is just a quick fix for the bug. In the long run we should
rewrite the whole backend module logic in order to move such crucial
conditions from the view to the domain layer.

Fixes: #2854

Adds a ViewHelper `ifModuleAccessible` that allows to evaluate whether a
given (sub) module is accessible to the currently authenticated user and
uses that ViewHelper in the SubmoduleOverview partial in order to hide
inaccessible modules from the module overview.

Background:

With #964 the `module.<submodule>.privilegeTarget` configuration became
deprecated in favor of `ModulePrivilege`s but the partial only checked
the "privilegeTarget" configuration.

Note: This is just a quick fix for the bug. In the long run we should
rewrite the whole backend module logic in order to move such crucial
conditions from the view to the domain layer.

Fixes: #2854
@bwaidelich bwaidelich merged commit 1c46186 into neos:4.3 Jan 10, 2020
2 checks passed
2 checks passed
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.