Add the below code in your portal_normal.vm file.
#if ( $is_signed_in )
#set ($rService = $serviceLocator.findService(“com.liferay.portal.service.RoleService”))
#set ($usrRoles = $rService.getUserRoles( $user_id ))
#set ($hasPermission = false)
#foreach( $usrRole in $usrRoles )
#if ( $usrRole.getName() == “Administrator” || $usrRole.getName() == “Content-Admin” || $usrRole.getName() == “Content-Editor”)
#set ($hasPermission = true)
#end
#end
#end
#if($hasPermission == true)
#dockbar()
#end
No comments:
Post a Comment