Add DAV edit link to StoredObject serialization

Enabled the adding of access link, specifically DAV edit link to the JSON serialization of the StoredObject entity. The patch also adjusted the serializer groups of various attributes of StoredObject from "read, write" to "write". Lastly, these changes were reflected in the accompanying CourseWork Controller and the FormEvaluation Vue component.
This commit is contained in:
2024-05-23 18:25:20 +02:00
parent 0dd58cebec
commit 47a928a6cd
4 changed files with 102 additions and 11 deletions

View File

@@ -48,14 +48,14 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
/**
* @ORM\Column(type="json", name="datas")
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private array $datas = [];
/**
* @ORM\Column(type="text")
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private string $filename = '';
@@ -66,7 +66,7 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
*
* @ORM\Column(type="integer")
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private ?int $id = null;
@@ -75,35 +75,35 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
*
* @ORM\Column(type="json", name="iv")
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private array $iv = [];
/**
* @ORM\Column(type="json", name="key")
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private array $keyInfos = [];
/**
* @ORM\Column(type="text", name="title")
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private string $title = '';
/**
* @ORM\Column(type="text", name="type", options={"default": ""})
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private string $type = '';
/**
* @ORM\Column(type="uuid", unique=true)
*
* @Serializer\Groups({"read", "write"})
* @Serializer\Groups({"write"})
*/
private UuidInterface $uuid;
@@ -137,8 +137,6 @@ class StoredObject implements AsyncFileInterface, Document, TrackCreationInterfa
*/
public function __construct(/**
* @ORM\Column(type="text", options={"default": "ready"})
*
* @Serializer\Groups({"read"})
*/
private string $status = 'ready'
) {