From f0c78a750e1ff7eaf3800e441e0ea6f2ab13a672 Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Thu, 17 Aug 2023 00:43:44 +0300 Subject: [PATCH 1/3] added missing required share data --- lib/Service/ExFilesActionsMenuService.php | 6 +++++- src/filesplugin.js | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Service/ExFilesActionsMenuService.php b/lib/Service/ExFilesActionsMenuService.php index 6df01b31..792c651c 100644 --- a/lib/Service/ExFilesActionsMenuService.php +++ b/lib/Service/ExFilesActionsMenuService.php @@ -157,7 +157,11 @@ public function handleFileAction(string $userId, string $appId, string $fileActi 'mtime' => $actionFile['mtime'], 'contentLength' => $actionFile['contentLength'], 'favorite' => $actionFile['favorite'] ?? "false", - 'permissions' => $actionFile['permissions'] + 'permissions' => $actionFile['permissions'], + 'shareTypes' => $actionFile['shareTypes'] ?? null, + 'shareAttributes' => $actionFile['shareAttributes'], + 'sharePermissions' => $actionFile['sharePermissions'], + 'userId' => $userId, ], ]; $exApp = $this->appEcosystemV2Service->getExApp($appId); diff --git a/src/filesplugin.js b/src/filesplugin.js index b01d5410..c4db129a 100644 --- a/src/filesplugin.js +++ b/src/filesplugin.js @@ -36,6 +36,9 @@ state.fileActions.forEach(fileAction => { fileType: file.dataset.type, contentLength: file.dataset.size, mtime: file.dataset.mtime, + shareTypes: file.dataset?.shareTypes, + shareAttributes: file.dataset.shareAttributes, + sharePermissions: file.dataset.sharePermissions, }, }).then((response) => { console.debug('response', response) From 63bfb562be46b2a651c077f4efdc2475613db0cf Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Thu, 17 Aug 2023 15:22:52 +0300 Subject: [PATCH 2/3] added share owner info --- lib/Service/ExFilesActionsMenuService.php | 6 ++++-- src/filesplugin.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Service/ExFilesActionsMenuService.php b/lib/Service/ExFilesActionsMenuService.php index b51e6d1f..30aec9b2 100644 --- a/lib/Service/ExFilesActionsMenuService.php +++ b/lib/Service/ExFilesActionsMenuService.php @@ -158,9 +158,11 @@ public function handleFileAction(string $userId, string $appId, string $fileActi 'size' => $actionFile['size'], 'favorite' => $actionFile['favorite'] ?? "false", 'permissions' => $actionFile['permissions'], + 'shareOwner' => $actionFile['shareOwner'], + 'shareOwnerId' => $actionFile['shareOwnerId'] ?? null, 'shareTypes' => $actionFile['shareTypes'] ?? null, - 'shareAttributes' => $actionFile['shareAttributes'], - 'sharePermissions' => $actionFile['sharePermissions'], + 'shareAttributes' => $actionFile['shareAttributes'] ?? null, + 'sharePermissions' => intval($actionFile['sharePermissions']) ?? null, 'userId' => $userId, ], ]; diff --git a/src/filesplugin.js b/src/filesplugin.js index 96084d68..f9be917f 100644 --- a/src/filesplugin.js +++ b/src/filesplugin.js @@ -37,8 +37,10 @@ state.fileActions.forEach(fileAction => { size: file.dataset.size, mtime: file.dataset.mtime, shareTypes: file.dataset?.shareTypes, - shareAttributes: file.dataset.shareAttributes, - sharePermissions: file.dataset.sharePermissions, + shareAttributes: file.dataset?.shareAttributes, + sharePermissions: file.dataset?.sharePermissions, + shareOwner: file.dataset?.shareOwner, + shareOwnerId: file.dataset?.shareOwnerId, }, }).then((response) => { console.debug('response', response) From b920209255aed437017e640a0b64443dbfca49e5 Mon Sep 17 00:00:00 2001 From: Andrey Borysenko Date: Thu, 17 Aug 2023 15:26:05 +0300 Subject: [PATCH 3/3] psalm fixes --- lib/Service/ExFilesActionsMenuService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Service/ExFilesActionsMenuService.php b/lib/Service/ExFilesActionsMenuService.php index 30aec9b2..19297e73 100644 --- a/lib/Service/ExFilesActionsMenuService.php +++ b/lib/Service/ExFilesActionsMenuService.php @@ -158,11 +158,11 @@ public function handleFileAction(string $userId, string $appId, string $fileActi 'size' => $actionFile['size'], 'favorite' => $actionFile['favorite'] ?? "false", 'permissions' => $actionFile['permissions'], - 'shareOwner' => $actionFile['shareOwner'], + 'shareOwner' => $actionFile['shareOwner'] ?? null, 'shareOwnerId' => $actionFile['shareOwnerId'] ?? null, 'shareTypes' => $actionFile['shareTypes'] ?? null, 'shareAttributes' => $actionFile['shareAttributes'] ?? null, - 'sharePermissions' => intval($actionFile['sharePermissions']) ?? null, + 'sharePermissions' => $actionFile['sharePermissions'] ?? null, 'userId' => $userId, ], ];