[arvados-workbench2] updated: 2.6.3-88-gd8b6d772

git repository hosting git at public.arvados.org
Tue Aug 22 19:42:22 UTC 2023


Summary of changes:
 src/store/resources/resources.test.ts | 3 ++-
 src/store/resources/resources.ts      | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

       via  d8b6d772739992431b81de993f8adc783b00feb1 (commit)
      from  017ab19b42969ed662d11291d399294c8f231a4e (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 d8b6d772739992431b81de993f8adc783b00feb1
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Aug 22 15:40:16 2023 -0400

    20829: Check parent for editable status
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/src/store/resources/resources.test.ts b/src/store/resources/resources.test.ts
index 503e19a2..64e19fe5 100644
--- a/src/store/resources/resources.test.ts
+++ b/src/store/resources/resources.test.ts
@@ -20,7 +20,7 @@ describe('resources', () => {
         const resourcesState = {
             [groupFixtures.editable_project_resource_uuid]: {
                 uuid: groupFixtures.editable_project_resource_uuid,
-                ownerUuid: groupFixtures.user_uuid,
+                ownerUuid: groupFixtures.user_resource_uuid,
                 createdAt: 'string',
                 modifiedByClientUuid: 'string',
                 modifiedByUserUuid: 'string',
@@ -74,6 +74,7 @@ describe('resources', () => {
                 href: 'string',
                 kind: ResourceKind.USER,
                 etag: 'string',
+                canWrite: true
             }
         };
 
diff --git a/src/store/resources/resources.ts b/src/store/resources/resources.ts
index a063db97..3f711404 100644
--- a/src/store/resources/resources.ts
+++ b/src/store/resources/resources.ts
@@ -17,6 +17,11 @@ export const getResourceWithEditableStatus = <T extends EditableResource & Group
 
         if (resource) {
             resource.isEditable = resource.canWrite;
+
+            if (!resource.isEditable && state[resource.ownerUuid]) {
+                const resourceOwner = JSON.parse(JSON.stringify(state[resource.ownerUuid] as T));
+                resource.isEditable = resourceOwner.canWrite;
+            }
         }
 
         return resource;

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list