removed unused code

This commit is contained in:
Francesco Mangiacrapa 2021-03-08 12:39:32 +01:00
parent b16efacd9f
commit a6de65a047
1 changed files with 2 additions and 21 deletions

View File

@ -164,10 +164,10 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
}finally {
if(originalScope!=null && originalScope.compareTo(targetFullScope)!=0) {
logger.info("Resetting the scope: "+originalScope + " was original WS context");
logger.info("Resetting the scope: "+originalScope + " which was original WS context");
ScopeProvider.instance.set(originalScope);
if(originalToken!=null) {
logger.info("Resetting the user token: "+originalToken.substring(0,10)+"-MASKED-TOKEN was original WS context");
logger.info("Resetting the user token: "+originalToken.substring(0,10)+"-MASKED-TOKEN which was original WS context");
SecurityTokenProvider.instance.set(originalToken);
}
@ -337,25 +337,6 @@ public class ThreddsWorkspaceSyncServiceImpl extends RemoteServiceServlet implem
}
/**
* Available scope for role , checks if for the input scope the user has the role of {@link GatewayRolesThredds.#THREDDS_ADMIN}
*
* @param role the role
* @param scope the scope
* @param groupManager the group manager
* @param scopeType the scope type
* @return the gcube scope {@link GcubeScope} if the user has the role of {@link GatewayRolesThredds.#THREDDS_ADMIN}, null otherwise
* @throws Exception the exception
*/
private GcubeScope availableScopeForRole(GatewayRolesThredds role, GCubeGroup scope, GroupManager groupManager, GcubeScopeType scopeType) throws Exception {
if(role!=null && role.equals(GatewayRolesThredds.DATA_MANAGER)) {
return new GcubeScope(scope.getGroupName(), groupManager.getInfrastructureScope(scope.getGroupId()), scopeType);
}
return null;
}
/**
* Checks if is item synched.
*