Hi!
This may not be exactly what you need but I've learned some ideas from this forum. What this code does is make use of the "User Groups" of Liferay to hide the dock for a certain group.
Basically, I don't want all users that I have set as members of the User Group "MyUsersGroup" to see the Dockbar, so this code checks if this user is part of it or not.
1
2#set ($userGroupLocalService = $serviceLocator.findService("com.liferay.portal.service.UserGroupLocalService"))
3#set ($userGroupLst = $userGroupLocalService.getUserUserGroups($user_id))
4#set($flag=0)
5
6#foreach($userGroup in $userGroupLst )
7#if("MyUsersGroup" == $userGroup.getName().trim())
8#set($flag=1)
9 #if (!$show_control_panel)
10 #dockbar()
11 #end
12#end
13#end
14
15#if($flag==0)
16 #if ($show_control_panel)
17 #dockbar()
18 #end
19#end
I hope it helps. Cheers!~