-
Notifications
You must be signed in to change notification settings - Fork 30
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
IBX-4877: Allow Location-based Content preview #359
Conversation
eZ/Publish/Core/MVC/Symfony/Controller/Content/PreviewController.php
Outdated
Show resolved
Hide resolved
@@ -7,7 +7,9 @@ | |||
{% endif %} | |||
<title>{{ title|default( 'Home' ) }}</title> | |||
<meta name="generator" content="Ibexa DXP"/> | |||
{% if content is defined and content.contentInfo.mainLocationId %} | |||
{% if content is defined and location is defined and location is not null and location.id is not null %} |
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.
is there really a possibility, that location.id is null?
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.
Yes, that can be a case, hence 24a5b01
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.
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.
@alongosz @ViniTou It is null by default, for example when one is creating a new LP anywhere and kernel gives us a preview, this is a standard behavior even without this PR:
This is a direct result of https://github.com/ezsystems/ezplatform-kernel/blob/1.3/eZ/Publish/Core/Helper/PreviewLocationProvider.php#L101-L109
Kudos, SonarCloud Quality Gate passed!
|
v3.3
As the title suggests. Using only main Location for preview would prevent certain users without access to main Location but with access to secondary Location from previewing such content.
Related PRs:
Checklist:
$ composer fix-cs
).@ezsystems/engineering-team
).