Thursday, December 27, 2012

Role checking in Template/vm file , Liferay

To perform the accesing of the service layers in web content we need to add the propertie in the portal-ext.properties file

journal.template.velocity.restricted.variables=

#set($roleLocalServiceUtil = $serviceLocator.findService("com.liferay.portal.service.RoleLocalService"))
#set($adminrole = $roleLocalServiceUtil.getRole($company_id, "Administrator"))

#set($hasadminrole = $roleLocalServiceUtil.hasUserRole($user_id, $getterUtil.getLong($adminrole.getRoleId())))

Liferay DXP JNDI Data Source Cofiguration

 This Blog will help us to learn about the JNDI Data Source Configuration in Liferay DXP. We have tested this with Liferay 7.3 with Tomcat. ...