Skip to content

Commit

Permalink
[Transfer] adds recursive rights param in dir import
Browse files Browse the repository at this point in the history
  • Loading branch information
Elorfin committed Sep 3, 2021
1 parent d0ea9a1 commit 81c768f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/core/API/Transfer/Action/Directory/CreateOrUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ public function execute(array $data, &$successData = [])
}

if ($resourceNode) {
$resourceNode = $this->serializer->deserialize($dataResourceNode, $resourceNode);
$options = [];
if (isset($data['recursive']) && $data['recursive']) {
$options[] = Options::IS_RECURSIVE;
}
$this->crud->update($resourceNode, $dataResourceNode, $options);
} else {
$resourceNode = $this->crud->create(ResourceNode::class, $dataResourceNode);
$resource = $this->crud->create(Directory::class, []);
Expand Down Expand Up @@ -251,6 +255,10 @@ public function getSchema(array $options = [], array $extra = []): array
],
],
],
'recursive' => [
'type' => 'boolean',
'description' => $this->translator->trans('apply_recursively_to_directories', [], 'platform'),
],
],

// this kind of hacky because this is not the true permissions description to begin with
Expand Down

0 comments on commit 81c768f

Please sign in to comment.