Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rishi Dev Gupta
Disable dock bar
November 7, 2012 1:11 AM
Answer

Rishi Dev Gupta

Rank: Expert

Posts: 255

Join Date: November 23, 2008

Recent Posts

I need disable dock bar in liferay 6.1.1.

The docbar should be enabled for Admins but should be disabled or be hidden for a site member or a normal user.

What is the correct way to achieve this?
Manish Kumar
RE: Disable dock bar
November 9, 2012 1:26 AM
Answer

Manish Kumar

Rank: Junior Member

Posts: 94

Join Date: March 1, 2012

Recent Posts

Hello Rishi,
You can check the condition in the portal_normal.vm on #dockbar().
For checking the admin user you can use permissionChecker.isOmniadmin() as your condition.

Thanks emoticon
Rishi Dev Gupta
RE: Disable dock bar
November 16, 2012 4:08 AM
Answer

Rishi Dev Gupta

Rank: Expert

Posts: 255

Join Date: November 23, 2008

Recent Posts

I think this is the easiest of the alternatives and is not the right way.

With Dock bar there are certain styling and javascript added to the page. Commenting or putting condition on theme will alter that behavior and the required libs will not be loaded.

Is there a way doing this by any configuration or permission model?
David H Nebinger
RE: Disable dock bar
November 16, 2012 5:29 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 6270

Join Date: September 1, 2006

Recent Posts

Use the permission checker as Manish said.

It is the right way and it will work.