Commit c39a71a0 authored by François Agneray's avatar François Agneray

Lists all datasets from API (server side auth)

parent 8fde9eec
......@@ -24,20 +24,6 @@ describe('[Metamodel] Dataset selector', () => {
expect(datasetSelector.getDatasetList(state).length).toEqual(0);
});
it('should get datasetList if no user logged in', () => {
const state = {
metamodel: {
dataset: {
...fromDataset.initialState,
datasetList: DATASET_LIST
}
}
};
const publicDatasetList: Dataset[] = datasetSelector.getUserAccessibleDatasetList(state, { userLevel: null });
expect(publicDatasetList.length).toEqual(1);
expect(publicDatasetList[0].name).toEqual('cat_1');
});
it('should get datasetList with cone search enabled', () => {
const state = {
metamodel: {
......
......@@ -38,14 +38,6 @@ export const getDatasetList = createSelector(
dataset.getDatasetList
);
export const getUserAccessibleDatasetList = createSelector(
getDatasetList,
// TODO: Change any type
(datasetList: Dataset[], props: { userLevel: any }) => {
return datasetList.filter(d => d.public === true);
}
);
export const getDatasetWithConeSearchList = createSelector(
getDatasetList,
(datasetList: Dataset[]) => {
......
......@@ -74,7 +74,7 @@ export class DatasetComponent implements OnInit {
this.datasetSearchMetaIsLoading = store.select(metamodelSelector.getDatasetSearchMetaIsLoading);
this.datasetSearchMetaIsLoaded = store.select(metamodelSelector.getDatasetSearchMetaIsLoaded);
this.projectList = store.select(metamodelSelector.getProjectList);
this.datasetList = store.select(metamodelSelector.getUserAccessibleDatasetList, { userLevel: null });
this.datasetList = store.select(metamodelSelector.getDatasetList);
this.datasetFamilyList = store.select(metamodelSelector.getDatasetFamilyList);
this.currentStep = store.select(searchSelector.getCurrentStep);
this.datasetName = store.select(searchSelector.getDatasetName);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment