[MAGNOLIA-5270] Don't render cms comments for components in preview, make sure that adding of opening and closing comments is in sync Created: 27/Aug/13  Updated: 29/Aug/13  Resolved: 28/Aug/13

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 4.5.11, 5.0.4
Fix Version/s: 4.5.11, 5.0.5, 5.1

Type: Bug Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by MAGNOLIA-5150 Don't render cms comments for areas i... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   
  1. MAGNOLIA-5150 disabled rendering of cms comments for areas, but comments for components are still rendered.
  2. Conditions for adding of opening/closing comments is not in sync for Component/AreaElement


 Comments   
Comment by Roman Kovařík [ 28/Aug/13 ]

Conditions for adding opening and closing cms:comments for Area/ComponentElement should be in synch:

        if (isAdmin() && !MgnlContext.getAggregationState().isPreviewMode() && hasPermission(content)) {
        if (isAdmin() && !MgnlContext.getAggregationState().isPreviewMode()) {
Comment by Roman Kovařík [ 28/Aug/13 ]

Make new method for checking of conditions mentioned above so we can use it both begin() and end() methods.

Generated at Mon Feb 12 04:03:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.