[ARVADOS-WORKBENCH2] updated: 1.4.0-47-gc866a7aa

Git user git at public.curoverse.com
Mon Aug 26 17:11:29 UTC 2019


Summary of changes:
 src/store/sharing-dialog/sharing-dialog-actions.ts | 30 +++++++---------------
 1 file changed, 9 insertions(+), 21 deletions(-)

       via  c866a7aa95f651df641c9eb3c468d8a7b2203814 (commit)
       via  54970f239795f4b957febefbc514572e0d19633c (commit)
      from  44bea80df466159e2f3a2a1f78735085bc0f090f (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 c866a7aa95f651df641c9eb3c468d8a7b2203814
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Aug 26 14:10:18 2019 -0300

    15524: Fixes 'share with group' feature.
    
    When sharing with a group, instead of creating a link for every group member,
    just create a link connected to the specified group.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/src/store/sharing-dialog/sharing-dialog-actions.ts b/src/store/sharing-dialog/sharing-dialog-actions.ts
index bbd50dbb..671c10fc 100644
--- a/src/store/sharing-dialog/sharing-dialog-actions.ts
+++ b/src/store/sharing-dialog/sharing-dialog-actions.ts
@@ -20,7 +20,6 @@ import { withProgress } from "~/store/progress-indicator/with-progress";
 import { progressIndicatorActions } from '~/store/progress-indicator/progress-indicator-actions.ts';
 import { snackbarActions, SnackbarKind } from "../snackbar/snackbar-actions";
 import { extractUuidKind, ResourceKind } from "~/models/resource";
-import { LinkClass } from "~/models/link";
 
 export const openSharingDialog = (resourceUuid: string) =>
     (dispatch: Dispatch) => {
@@ -204,21 +203,6 @@ const sendInvitations = async (_: Dispatch, getState: () => RootState, { permiss
 
         const getGroupsFromForm = invitations.invitedPeople.filter((invitation) => extractUuidKind(invitation.uuid) === ResourceKind.GROUP);
         const getUsersFromForm = invitations.invitedPeople.filter((invitation) => extractUuidKind(invitation.uuid) === ResourceKind.USER);
-        const uuids = getGroupsFromForm.map(group => group.uuid);
-
-        const permissions = await permissionService.list({
-            filters: new FilterBuilder()
-                .addIn('tailUuid', uuids)
-                .addEqual('linkClass', LinkClass.PERMISSION)
-                .getFilters()
-        });
-
-        const usersFromGroups = await userService.list({
-            filters: new FilterBuilder()
-                .addIn('uuid', permissions.items.map(item => item.headUuid))
-                .getFilters()
-
-        });
 
         const invitationDataUsers = getUsersFromForm
             .map(person => ({
@@ -228,11 +212,11 @@ const sendInvitations = async (_: Dispatch, getState: () => RootState, { permiss
                 name: invitations.permissions
             }));
 
-        const invitationsDataGroups = usersFromGroups.items.map(
-            person => ({
+        const invitationsDataGroups = getGroupsFromForm.map(
+            group => ({
                 ownerUuid: user.uuid,
                 headUuid: dialog.data,
-                tailUuid: person.uuid,
+                tailUuid: group.uuid,
                 name: invitations.permissions
             })
         );

commit 54970f239795f4b957febefbc514572e0d19633c
Author: Lucas Di Pentima <lucas at di-pentima.com.ar>
Date:   Mon Aug 26 12:51:19 2019 -0300

    15524: Shows groups names on sharing dialog's permission rows where applicable.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/src/store/sharing-dialog/sharing-dialog-actions.ts b/src/store/sharing-dialog/sharing-dialog-actions.ts
index 17b237ec..bbd50dbb 100644
--- a/src/store/sharing-dialog/sharing-dialog-actions.ts
+++ b/src/store/sharing-dialog/sharing-dialog-actions.ts
@@ -74,19 +74,23 @@ const loadSharingDialog = async (dispatch: Dispatch, getState: () => RootState,
 };
 
 const initializeManagementForm = (permissionLinks: PermissionResource[]) =>
-    async (dispatch: Dispatch, getState: () => RootState, { userService }: ServiceRepository) => {
+    async (dispatch: Dispatch, getState: () => RootState, { userService, groupsService }: ServiceRepository) => {
 
         const filters = new FilterBuilder()
             .addIn('uuid', permissionLinks.map(({ tailUuid }) => tailUuid))
             .getFilters();
 
         const { items: users } = await userService.list({ filters });
+        const { items: groups} = await groupsService.list({ filters });
 
         const getEmail = (tailUuid: string) => {
             const user = users.find(({ uuid }) => uuid === tailUuid);
+            const group = groups.find(({ uuid }) => uuid === tailUuid);
             return user
                 ? user.email
-                : tailUuid;
+                : group
+                    ? group.name
+                    : tailUuid;
         };
 
         const managementPermissions = permissionLinks

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list