Panel Pane visibility rule based on users in entity reference field

448 views Asked by At

I have a content type called 'company' with an entity reference field called 'company_managers' referencing users who will be allowed to add and edit other content types relating to this company.

The company node is displayed using panels. What I am struggling with is to create a visibility rule which will only show a panel-pane if the logged in user is referenced in the entity field 'company_managers' this will allow me to show panel panes specific to users in the 'company_managers' field.

So the psudo logic for the visibility rule would be: Check if logged in user is contained in 'company_managers' If yes show panel-pane if no dont show pane.

This seems such a simple use case that i dont want to create custom code it must be achievable 'out the box' I just cant seem to get to the answer. So after two days of researching am asking for help.

NOTE: have spoofed this behavior using the visibility rule content manager and manually selecting a user on this site. All I would need is to put in the logged in user but I dont think you can put in dynamic variables or tokens.

Help much appreciated.

0

There are 0 answers