[ARVADOS-WORKBENCH2] updated: 1.2.0-1015-g9dc1cd9

Git user git at public.curoverse.com
Wed Nov 28 06:24:11 EST 2018


Summary of changes:
 src/store/sharing-dialog/sharing-dialog-actions.ts | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

       via  9dc1cd9abe5d0a9dbd71ae7a95996174e9bf07c4 (commit)
      from  745374f29652ebb8720f5303a403f680d86f971f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 9dc1cd9abe5d0a9dbd71ae7a95996174e9bf07c4
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Nov 28 12:24:04 2018 +0100

    refs #14496-infinite-loading-when-trying-to-share-a-project-without-permission
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/store/sharing-dialog/sharing-dialog-actions.ts b/src/store/sharing-dialog/sharing-dialog-actions.ts
index 0e3c76b..37de6f8 100644
--- a/src/store/sharing-dialog/sharing-dialog-actions.ts
+++ b/src/store/sharing-dialog/sharing-dialog-actions.ts
@@ -56,13 +56,18 @@ export const sendSharingInvitations = async (dispatch: Dispatch) => {
 const loadSharingDialog = async (dispatch: Dispatch, getState: () => RootState, { permissionService }: ServiceRepository) => {
 
     const dialog = getDialog<string>(getState().dialog, SHARING_DIALOG_NAME);
-
     if (dialog) {
         dispatch(progressIndicatorActions.START_WORKING(SHARING_DIALOG_NAME));
-        const { items } = await permissionService.listResourcePermissions(dialog.data);
-        dispatch<any>(initializePublicAccessForm(items));
-        await dispatch<any>(initializeManagementForm(items));
-        dispatch(progressIndicatorActions.STOP_WORKING(SHARING_DIALOG_NAME));
+        try {
+            const { items } = await permissionService.listResourcePermissions(dialog.data);
+            dispatch<any>(initializePublicAccessForm(items));
+            await dispatch<any>(initializeManagementForm(items));
+            dispatch(progressIndicatorActions.STOP_WORKING(SHARING_DIALOG_NAME));
+        } catch (e) {
+            dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'You do not have access to share this item', hideDuration: 2000, kind: SnackbarKind.ERROR }));
+            dispatch(dialogActions.CLOSE_DIALOG({ id: SHARING_DIALOG_NAME }));
+            dispatch(progressIndicatorActions.STOP_WORKING(SHARING_DIALOG_NAME));
+        }
     }
 };
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list