diff --git a/reana-ui/src/actions.js b/reana-ui/src/actions.js
index ad25e5f..14af4e6 100644
--- a/reana-ui/src/actions.js
+++ b/reana-ui/src/actions.js
@@ -293,11 +293,13 @@ export function fetchWorkflows({
sort,
showLoader = true,
workflowIdOrName,
+ includeShared = false,
}) {
return async (dispatch) => {
if (showLoader) {
dispatch({ type: WORKFLOWS_FETCH });
}
+
return await client
.getWorkflows({
pagination,
@@ -307,15 +309,16 @@ export function fetchWorkflows({
sharedWith,
sort,
workflowIdOrName,
+ includeShared,
})
- .then((resp) =>
+ .then((resp) => {
dispatch({
type: WORKFLOWS_RECEIVED,
workflows: parseWorkflows(resp.data.items),
total: resp.data.total,
userHasWorkflows: resp.data.user_has_workflows,
- }),
- )
+ });
+ })
.catch((err) => {
dispatch(errorActionCreator(err, USER_INFO_URL));
dispatch({ type: WORKFLOWS_FETCH_ERROR });
@@ -335,6 +338,7 @@ export function fetchWorkflow(id, { refetch = false, showLoader = true } = {}) {
fetchWorkflows({
workflowIdOrName: id,
showLoader,
+ includeShared: true,
}),
);
}
diff --git a/reana-ui/src/client.js b/reana-ui/src/client.js
index 9d50867..f7f42e2 100644
--- a/reana-ui/src/client.js
+++ b/reana-ui/src/client.js
@@ -131,14 +131,16 @@ class Client {
sharedWith,
sort,
workflowIdOrName,
+ includeShared = false,
} = {}) {
let shared = false;
- if (ownedBy === "anybody") {
+ if (ownedBy === "anybody" || includeShared) {
ownedBy = undefined;
shared = true;
} else if (ownedBy === "you") {
ownedBy = undefined;
}
+
return this._request(
WORKFLOWS_URL({
...(pagination ?? {}),
diff --git a/reana-ui/src/components/WorkflowActionsPopup.js b/reana-ui/src/components/WorkflowActionsPopup.js
index 3ecf5bc..d0d551e 100644
--- a/reana-ui/src/components/WorkflowActionsPopup.js
+++ b/reana-ui/src/components/WorkflowActionsPopup.js
@@ -29,7 +29,11 @@ import styles from "./WorkflowActionsPopup.module.scss";
const JupyterIcon =