RE: Hide dockbar menu for regular Users in 7.3.2

Max Max Max, modified 2 Years ago. New Member Posts: 23 Join Date: 2/2/07 Recent Posts
HI,
For Liferay 7.3.2:I have a use case where I have a Liferay site for my main website, and then a members only site for those who are logged in. However in the member area, I don't want the user to be able to create any content or pages, i just want to show a normal website with pretty much static content.
For the menu I have managed to remove all the options except for My SItes and Signout, which is as desired. i did this by removing certain permissions for the role 'User'. I also managed to restrict the users ability to create their own content by add the following to portal-ext.properties:
layout.user.public.layouts.enabled=false
layout.user.private.layouts.enabled=false
sites.control.panel.members.visible=false

So I am almost there, except now I still have that big black band to the left of the screen which I think in Liferay speak is called the dockbar. This is now permanently visible, cannot be closed, and on a small screen simply obliterates everything else.  It is also empty except for the site name and logo at the top.
How can I remove/hide this dockbar please? I saw some contradictory comments online about having to create a theme to do this. I have to avoid creating custom themes at all costs because of the prohibitively massive effort they result in when upgrading Liferay versions.Please can someone point me in the right direction.
Surely this is a common use case for LIferay?
Max
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Max Max Max:

...
How can I remove/hide this dockbar please? I saw some contradictory comments online about having to create a theme to do this. I have to avoid creating custom themes at all costs because of the prohibitively massive effort they result in when upgrading Liferay versions.Please can someone point me in the right direction. ...

A theme is the natural place for the CSS that you'll need. If you shy away from a full theme, you can also implement a ThemeContributor, which adds details to a theme. In any case, you'll need to identify the required CSS to do what you need (on top of whatever theme us use) first, before you can persist it in either your own theme, or in your own ThemeContributor.
Max Max Max, modified 2 Years ago. New Member Posts: 23 Join Date: 2/2/07 Recent Posts
Hi Olaf,
Thanks for the tip, but this also seems extreme for such a simple requirement. To a Liferay user who does not have a development team on hand, it will take at least 5 days of effort to perform this simple action. This includes installing the development environment, learning how to create a ThemeContributor, learning how the CSS in Liferay works, developing and testing the actual change. And then having to deal with this theme change in each and every new release! This doesn't translate to a productive environment! Or is Liferay really not suitable for the "simple" user?
Surely there is an easier way. The black dock bar does not appear for the Guest role, so I assume that it is permission based. Is it really not possible to remove this via a permission change?
The other problem is that the dock bar covers the site content when on a narrow screen.
To be sure we are talking about the correct "dock bar", I have added a screen shot of the problem I am facing to this post. Is this in fact the "dock bar"? As you can see the dockbar is covering the actual page content.
Any suggestions welcome please.
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
What roles do your users have? There are indeed roles that control that behavior in 7.2+, a normal user should not see the dockbar. Maybe it is Power User related, can you try to remove that role from a testuser?
Max Max Max, modified 2 Years ago. New Member Posts: 23 Join Date: 2/2/07 Recent Posts
It seems this was a different problem - I assume a bug.
I have since discovered the following:The "Dock bar" is actually called the "Product Menu". Here is a helpful diagram with the Liferay names https://help.liferay.com/hc/en-us/articles/360018167651-Introduction-to-Product-Navigation

It was actually already disabled through the use of the portal-ext-properties
layout.user.public.layouts.enabled=false
layout.user.private.layouts.enabled=false
But was  somehow stuck open.
So I removed the above properties, restarted liferay. opened the site (the Product Menu  was open), closed the Product Menu. And then re-added the above properties, restarted Liferay, and now the Product menu is invisible. Success!
My Users have the User role. No, user is not a Power User.