I have a requirement to display a specific portlet only if the user is logged in. My question is what would be the appropriate way to handle this kind of requirement. Should I handle it through code by using
renderRequest.setAttribute(WebKeys.PORTLET_CONFIGURATOR_VISIBILITY, Boolean.FALSE);
Or is this kind of configuration done using portlet's roles or any kind of portal properties?
As per my understanding, this might be handled by adding a role to the portlet, but I am not sure about where and how to set portlet roles.