release gCube 3.1
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@95402 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4937821396
commit
72a3641e9f
|
@ -1,6 +1,6 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets.user.NewsFeed.1-6-4"
|
||||
date="2014-04-10">
|
||||
date="2014-05-07">
|
||||
<Change>Implemented the automatic scroll back in time for feeds (in
|
||||
VRE scope)</Change>
|
||||
<Change>Added possibility to unlike alread liked posts</Change>
|
||||
|
|
|
@ -75,6 +75,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
|||
|
||||
private static final String SESSION_ADMIN_ATTR = "SESSION_ADMIN_ATTR";
|
||||
private static final String USER_SETTINGS_ATTR = "USER_SETTINGS_ATTR";
|
||||
private static final String TEST_USER = "test.user";
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -115,7 +116,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
|||
* @return .
|
||||
*/
|
||||
public String getDevelopmentUser() {
|
||||
String user = "test.user";
|
||||
String user = TEST_USER;
|
||||
//user = "massimiliano.assante";
|
||||
return user;
|
||||
}
|
||||
|
@ -133,7 +134,15 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
|||
String fullName = username+" FULL";
|
||||
String thumbnailURL = "images/Avatar_default.png";
|
||||
|
||||
if (withinPortal) {
|
||||
boolean isDevelopment = false;
|
||||
try {
|
||||
UserLocalServiceUtil.getService();
|
||||
}
|
||||
catch (com.liferay.portal.kernel.bean.BeanLocatorException ex) {
|
||||
isDevelopment = true;
|
||||
}
|
||||
|
||||
if (username.compareTo(TEST_USER) != 0 && !isDevelopment) {
|
||||
UserModel user = UserLocalServiceUtil.getUserByScreenName(OrganizationsUtil.getCompany().getCompanyId(), username);
|
||||
thumbnailURL = "/image/user_male_portrait?img_id="+user.getPortraitId();
|
||||
fullName = user.getFirstName() + " " + user.getLastName();
|
||||
|
@ -154,7 +163,7 @@ public class NewsServiceImpl extends RemoteServiceServlet implements NewsService
|
|||
else {
|
||||
_log.info("Returning test USER");
|
||||
CustomConfiguration config = getUserConfiguration();
|
||||
UserInfo user = new UserInfo(getASLSession().getUsername(), fullName, thumbnailURL, email, "fakeAccountUrl", true, false, null);
|
||||
UserInfo user = new UserInfo(session.getUsername(), fullName, thumbnailURL, email, "fakeAccountUrl", true, false, null);
|
||||
return new UserSettings(user, config.getRefreshTime(), session.getScopeName(), config.getVreLabel(), isInfrastructureScope(), config.isShowTimelineSource());
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<inherits name='com.google.gwt.user.User' />
|
||||
|
||||
<!-- To Comment out -->
|
||||
<!-- <set-property name="user.agent" value="safari,gecko1_8,ie9" /> -->
|
||||
<set-property name="user.agent" value="safari,gecko1_8,ie9" />
|
||||
|
||||
<!-- Other module inherits -->
|
||||
<inherits name="net.eliasbalasis.tibcopagebus4gwt.tibcopagebus4gwt" />
|
||||
|
|
Loading…
Reference in New Issue