LPS-34192

Hi @rotty3000

So here is the working version of embedded portlets fix. I know it looks a bit scary, but it's not that complex, only too many commits :)

I haven't applied the PortletSecurity renaming changes. I apply them when I rebase it on master next week, I believe you will require some more changes to this pull anyway.

Thank you for your help.