留言板

Disable dock bar

thumbnail
Rishi Dev Gupta,修改在11 年前。

Disable dock bar

Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
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?
thumbnail
Manish Kumar,修改在11 年前。

RE: Disable dock bar

Junior Member 帖子: 93 加入日期: 12-3-2 最近的帖子
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
thumbnail
Rishi Dev Gupta,修改在11 年前。

RE: Disable dock bar

Expert 帖子: 255 加入日期: 08-11-23 最近的帖子
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?
thumbnail
David H Nebinger,修改在11 年前。

RE: Disable dock bar

Liferay Legend 帖子: 14917 加入日期: 06-9-2 最近的帖子
Use the permission checker as Manish said.

It is the right way and it will work.