@@ -23,17 +23,18 @@ import {
2323 loadingWorkflows ,
2424 userHasWorkflows ,
2525 getWorkflowRefresh ,
26+ getUsersSharedWithYou ,
2627} from "~/selectors" ;
2728import { NON_DELETED_STATUSES } from "~/config" ;
28- import { Title } from "~/components" ;
29- import { Pagination , Search } from "~/components" ;
29+ import { Pagination , Search , Title } from "~/components" ;
3030import { applyFilter } from "~/components/Search" ;
3131import BasePage from "../BasePage" ;
3232import Welcome from "./components/Welcome" ;
3333import WorkflowFilters from "./components/WorkflowFilters" ;
3434import WorkflowList from "./components/WorkflowList" ;
3535
3636import styles from "./WorkflowList.module.scss" ;
37+ import _ from "lodash" ;
3738
3839const PAGE_SIZE = 5 ;
3940
@@ -63,6 +64,7 @@ function Workflows() {
6364 const loading = useSelector ( loadingWorkflows ) ;
6465 const reanaToken = useSelector ( getReanaToken ) ;
6566 const configLoaded = useSelector ( isConfigLoaded ) ;
67+ const usersSharedWithYou = useSelector ( getUsersSharedWithYou , _ . isEqual ) ;
6668 const interval = useRef ( null ) ;
6769 const hideWelcomePage = ! workflows || ! configLoaded ;
6870 const { pollingSecs } = config ;
@@ -75,10 +77,15 @@ function Workflows() {
7577 useEffect ( ( ) => {
7678 let shared = false ;
7779 let sharedBy = null ;
80+
7881 if ( ownedByFilter === "anybody" ) {
7982 shared = true ;
8083 sharedBy = null ;
84+ } else if ( ownedByFilter === "others" ) {
85+ shared = true ;
86+ sharedBy = `${ usersSharedWithYou . map ( ( user ) => user . email ) } ` ;
8187 } else if ( ownedByFilter !== "you" ) {
88+ // Owned by specific user
8289 sharedBy = ownedByFilter ;
8390 }
8491
@@ -125,6 +132,7 @@ function Workflows() {
125132 sharedWithFilter ,
126133 sortDir ,
127134 workflowRefresh ,
135+ usersSharedWithYou ,
128136 ] ) ;
129137
130138 const cleanPolling = ( ) => {
0 commit comments