diff --git a/src/selectors.ts b/src/selectors.ts index 26f5e9f6..6dc64a50 100644 --- a/src/selectors.ts +++ b/src/selectors.ts @@ -123,11 +123,14 @@ export const selectSitesAndUserRoles = createSelector( ); export const selectProjectsWithTransferrableSites = createSelector( - [selectProjectsWithUserRole, selectSites], - (projects, sites) => { + [selectProjectsWithUserRole, selectSites, selectSitesAndUserRoles], + (projects, sites, sitesWithRoles) => { const projectSites = projects.flatMap(project => Object.keys(project.sites) - .filter(siteId => siteId in project.sites) + .filter( + siteId => + siteId in project.sites && sitesWithRoles[siteId] === 'manager', + ) .map(siteId => { const joinedSite = sites[siteId];