Dipti Ranparia
Dipti Ranparia

Reputation: 570

How to hide Top Navigation Bar For Given Role in Liferay?

I want to hide top menu navigation bar when user role is "ERP USER", logout link should be remains there. or how to remove navigation item "My Profile", "My Account" & "My Dashboard". due to some security access in third party application i need to disable this navigation items.

Can anybody explain me how to accomplish my requirement?

Thanks!!!

Upvotes: 1

Views: 6707

Answers (2)

Steve
Steve

Reputation: 115

You can remove navigation bar using Liferay theme from portal_normal.vm for specific user. Apply this theme to your current site.

Upvotes: 0

You can remove My Profile, My Dashboard and Control Panel entries by modifying portal configuration, the rest requires some development. First two will disappear if you set followig options in portal-ext.properties to false:

#
# Set whether or not private layouts are enabled. Set whether or not private
# layouts should be auto created if a user has no private layouts. If
# private layouts are not enabled, then the property
# "layout.user.private.layouts.auto.create" is assumed to be false.
#

layout.user.private.layouts.enabled=true
layout.user.private.layouts.auto.create=true
#
# Set whether or not public layouts are enabled. Set whether or not public
# layouts should be auto created if a user has no public layouts. If public
# layouts are not enabled, then the property
# "layout.user.public.layouts.auto.create" is assumed to be false.
#
layout.user.public.layouts.enabled=true
layout.user.public.layouts.auto.create=true

That you will disable User's private and public pages (and remove them from dockbar).

To get rid of Control Panel, you have to revoke Access Control Panel permission in Roles configuration (usually for User role).

Your other two requirements - hiding My Profile or removing Dockbar will require more effort.

Upvotes: 2

Related Questions