Skip to content

Commit 43ac2f9

Browse files
committed
fix(dataset-actions): allow user to attach a dataset to a project they are an admin
previously this only worked for projects the user was an editor of
1 parent fa62cca commit 43ac2f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

features/DatasetsTable/DatasetDetails/VersionActionsSection/AttachDatasetListItem/AttachDatasetListItem.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export const AttachDatasetListItem = ({ datasetId, version }: AttachDatasetListI
5454

5555
const { data: projectsData, isLoading: isProjectsLoading } = useGetProjects();
5656
const projects = projectsData?.projects.filter(
57-
({ editors }) => user.username && editors.includes(user.username),
57+
({ editors, administrators }) =>
58+
user.username && (editors.includes(user.username) || administrators.includes(user.username)),
5859
);
5960

6061
const { data: typesData, isLoading: isTypesLoading } = useGetFileTypes();

0 commit comments

Comments
 (0)