Skip to content
Snippets Groups Projects
Commit 66734ff9 authored by jakubs's avatar jakubs
Browse files

SSDM-50 detect access to data set file

SVN: 31249
parent 05969890
Loading
......@@ -324,6 +324,8 @@ abstract public class AbstractDatasetDownloadServlet extends HttpServlet
protected final void ensureDatasetAccessible(String dataSetCode, HttpSession session,
String sessionIdOrNull)
{
applicationContext.getDataSetService().notifyDatasetAccess(dataSetCode);
if (isDatasetAccessible(dataSetCode, sessionIdOrNull, session) == false)
{
throw new UserFailureException("Data set '" + dataSetCode + "' is not accessible.");
......
......@@ -878,6 +878,12 @@ public final class EncapsulatedOpenBISService implements IEncapsulatedOpenBISSer
service.markSuccessfulPostRegistration(session.getSessionToken(), dataSetCode);
}
@Override
public void notifyDatasetAccess(String dataSetCode)
{
service.notifyDatasetAccess(session.getSessionToken(), dataSetCode);
}
@Override
public List<AbstractExternalData> listDataSetsForPostRegistration()
{
......
......@@ -479,6 +479,12 @@ public interface IEncapsulatedOpenBISService extends IEncapsulatedBasicOpenBISSe
@ManagedAuthentication
public void markSuccessfulPostRegistration(String dataSetCode);
/**
* {@link IServiceForDataStoreServer#notifyDatasetAccess(String, String)}
*/
@ManagedAuthentication
public void notifyDatasetAccess(String dataSetCode);
/**
* {@link IServiceForDataStoreServer#listDataSetsForPostRegistration(String, String)}
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment