dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
860 stars 467 forks source link

Relationship not displaying for FE user when added to page via direct reference #28295

Open nathan-hildebrandt opened 6 months ago

nathan-hildebrandt commented 6 months ago

Parent Issue

No response

Problem Statement

When navigating to a page while logged in as a front end user, VTL Code that is pulling a direct reference to relationships is not displaying correctly despite it displaying fine when logged in as a back end user or logged out.

Steps to Reproduce

  1. From a demo starter create a code widget on the Main page that pulls a piece of content's relationships using Direct Reference, here is sample code that uses demo content.

    <h2>Locations</h2>
    #foreach($location in $dotcontent.pull("+contentType:Location",3,"modDate desc"))
    #editContentlet($location.inode)
    <h3>$location.title</h3>
    #set($employeeList = $!{location.employees})
    <h4>Employee(s):</h4>
    <ul>
        #foreach($relatedEmployee in $employeeList)
            <li>$relatedEmployee.firstName $relatedEmployee.lastName</li>
        #end
    </ul>
    #end 
  2. Navigate to the main page and you will see the relationship pull correctly.

  3. Log in to the members page using the default members user.

  4. Navigate to the main page again and you will see the relationships are no longer there.

Acceptance Criteria

Front end users should have the same privileges to view relationship pulls as anonymous users.

dotCMS Version

Current master, 23.10, 23.01

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

https://dotcms.zendesk.com/agent/tickets/115996

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.