fixed the issue on getWorkspaceFolderURL method
This commit is contained in:
parent
b204c9f343
commit
9b1c436756
|
@ -27,6 +27,7 @@ import org.gcube.portlets.user.wswidget.shared.WSItem;
|
||||||
|
|
||||||
import com.liferay.portal.kernel.log.Log;
|
import com.liferay.portal.kernel.log.Log;
|
||||||
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
import com.liferay.portal.kernel.log.LogFactoryUtil;
|
||||||
|
import com.liferay.portal.util.PortalUtil;
|
||||||
|
|
||||||
public class StorageHubServiceUtil {
|
public class StorageHubServiceUtil {
|
||||||
private static Log _log = LogFactoryUtil.getLog(StorageHubServiceUtil.class);
|
private static Log _log = LogFactoryUtil.getLog(StorageHubServiceUtil.class);
|
||||||
|
@ -141,6 +142,15 @@ public class StorageHubServiceUtil {
|
||||||
String toReturn = siteLandingPagePath;
|
String toReturn = siteLandingPagePath;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
String currentContext = Utils.getCurrentContext(request);
|
||||||
|
try {
|
||||||
|
long userId = PortalUtil.getUser(request).getUserId();
|
||||||
|
JWTToken umaToken = OIDCUmaUtil.getUMAToken(request, userId, currentContext);
|
||||||
|
UmaJWTProvider.instance.set(umaToken.getRaw());
|
||||||
|
} catch (Exception e1) {
|
||||||
|
e1.printStackTrace();
|
||||||
|
}
|
||||||
|
ScopeProvider.instance.set(currentContext);
|
||||||
WorkspaceManagerClient wsclient = AbstractPlugin.workspace().build();
|
WorkspaceManagerClient wsclient = AbstractPlugin.workspace().build();
|
||||||
String itemId = wsclient.getVreFolder("hl:accounting").getId();
|
String itemId = wsclient.getVreFolder("hl:accounting").getId();
|
||||||
toReturn = new String(new StringBuffer(siteLandingPagePath)
|
toReturn = new String(new StringBuffer(siteLandingPagePath)
|
||||||
|
|
Loading…
Reference in New Issue