LPS-31210

LPS-31210 Centralize permission check to access any portlet in Control Panel to one class

Hey Tomas,

This is my attempt at centralizing all checks to access a portlet in PortletPermissionImpl, including those that are in a page or are in the Control Panel. Here are some important details that are worth explaining:
1) Before these changes, PortletPermissionImpl just allowed all checks for VIEW permission for portlets in the Control Panel. It was assuming that proper checks were done elsewhere. I've now moved all checks inside that class.
2) With these changes, in order to decide whether to grant permission to VIEW a portlet in the Control Panel the ControlPanelEntry framework is used. This framework, among other things checks for the permission ACCESS_IN_CONTROL_PANEL.
3) PortletContainerImpl invokes PortletPermission.hasAccessPermission() which now does what explained in #2 for all invocations to a portlet processAction and serveResource. Previously this check was always true for control panel portlets, so with these changes we are now doing many more checks. I think this is the right thing to do and will help close potential vulnerabilities in the future, but I'd like someone else to think this through as well.
4) I haven't done any test with embedded portlets or portlets invoked from other portlets. I wouldn't be surprised if they fail, specially due to #3 above. Please test them and contact me if you need guidance to support those cases.

That's it. Thanks!

/cc @rotty3000 @mhan810