I’ve got a custom module and am trying to set up the edit and delete functions on the detail layout to ONLY be available to the logged in content owner.
I have tried wrapping the edit/delete buttons and testing if the user is logged in and that works but the edit button displays for ALL logged in users, not just the content owner.
I thought maybe I could create 2 detail layouts - one showing the edit and delete function for the content owner and one for everyone else but not sure how to edit the link.
eg
<a href="{{this['Url']}}"> See more</a> - links to public layout (no edit button)
<a href="{{this['Url' | with special layout]}}">
See more</a> - links to content owner layout with edit button
alternatively is there a way to test if the logged in user is the content owner?