This commit is contained in:
Massimiliano Assante 2021-04-06 12:51:25 +02:00
parent e567750d6f
commit ff6cd1f69c
2 changed files with 7 additions and 5 deletions

View File

@ -157,11 +157,10 @@ public class StorageHubServiceUtil {
* @param request
* @return the VRE Folders Id
*/
public static String getVREFoldersId(long groupId, HttpServletRequest request) {
public static String getVREFoldersId(long groupId, HttpServletRequest request, String currentUsername) {
String toReturn = "";
PortalContext pContext = PortalContext.getConfiguration();
String currentContext = PortalContext.getConfiguration().getCurrentScope(""+groupId);
String username = pContext.getCurrentUser(request).getUsername();
String username = currentUsername;
try {
JWTToken umaToken = OIDCUmaUtil.getUMAToken(request, username, currentContext);
UmaJWTProvider.instance.set(umaToken.getRaw());

View File

@ -3,7 +3,10 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<% pageContext.setAttribute("currentGroup", GroupLocalServiceUtil.getGroup(PortalUtil.getScopeGroupId(request)));
<%
pageContext.setAttribute("currentGroup", GroupLocalServiceUtil.getGroup(PortalUtil.getScopeGroupId(request)));
pageContext.setAttribute("currentUsername", PortalUtil.getUser(request).getScreenName());
;
%>
<script src="<%=renderRequest.getContextPath()%>/js/datatables.min.js"></script>
@ -42,7 +45,7 @@
</c:when>
<c:otherwise>
<td>
<%pageContext.setAttribute("vreFoldersId", StorageHubServiceUtil.getVREFoldersId(PortalUtil.getScopeGroupId(request), request));%>
<%pageContext.setAttribute("vreFoldersId", StorageHubServiceUtil.getVREFoldersId(PortalUtil.getScopeGroupId(request), request, currentUsername));%>
<c:if test="${not empty vreFoldersId}">
<div id="vreFoldersDiv" class="ws-recents">
<a