LPS-42107

Hi Tomáš ( and Shuyang ),

This pull requst is for Tomáš. Tomáš as you are original author of the SecurityPortletContainerWrapper could you review my change.

See the issue LPS-42107 how to reproduce the problem.

The first problem was, that I did found out that example "edit" mode permissions was checked from all portlets, even though it should be for only that one which is changing to edit mode. So I did add p_p_id check to this - 0c8b9e0c0a67b526ea83d100d1b471c120d0f919

Then I did found out that this was not enough, and edit mode was still checked for the embedded theme portlets like Dockbar (145). So I did force these portlets to be always view mode. To this change I really would like to have wider comments ( @shuyangzhou ). Are we allowing the portlets inside theme to support edit mode? If yes then this change 6d46187422003a4808b63b806e0a5ca37b63523f has to take another level.