diff --git a/distro/changelog.xml b/distro/changelog.xml index eb129cb..e52f964 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,10 +1,12 @@ - + Ported to Liferay 6.2 - - Minor bug fix: long vre's name managed properly(Bug #2042) + Minor bug fix: long vre's name managed properly(Bug #2042) + diff --git a/pom.xml b/pom.xml index 1761345..9781fc8 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ org.gcube.portlets.user user-statistics war - 2.0.1-SNAPSHOT + 2.0.0-SNAPSHOT User statistics portlet User statistics portlet shows main user's statistics. diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java index 5ed5daa..f2d3a53 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java @@ -29,6 +29,7 @@ import org.gcube.vomanagement.usermanagement.util.ManagementUtils; import org.slf4j.LoggerFactory; import com.google.gwt.user.server.rpc.RemoteServiceServlet; +import com.liferay.portal.kernel.cache.CacheRegistryUtil; import com.liferay.portal.model.Contact; import com.liferay.portal.model.User; import com.liferay.portal.model.Website; @@ -288,6 +289,8 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U // the stastics to show will be of the userid statisticsOfUsername = userid; isProfileShowable = checkUserPrivacyOption(statisticsOfUsername); + + _log.info("Is profile showable for user " + userid + " " + isProfileShowable); } //in case the portal is restarted and you have the social home open it will get test.user (no callback to set session info) @@ -347,6 +350,9 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U // set permission checker setPermissionChecker(); + + //needed to avoid cache use by liferay API + CacheRegistryUtil.clear(); User user = UserLocalServiceUtil.getUserByScreenName(ManagementUtils.getCompany().getCompanyId(), username); @@ -461,6 +467,9 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U // set permission checker setPermissionChecker(); + + //needed to avoid cache use by liferay API + CacheRegistryUtil.clear(); _log.debug("User " + username + (show ? " want to show " : " doesn't want to show ") + " his statistics");