Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Sep 12, 2023
1 parent f1560da commit f3e42af
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,5 @@ jobs:
run: |
ECR_REGISTRY="${{ steps.login-ecr-public.outputs.registry }}/${REGISTRY_ALIAS}"
docker image ls | grep ${{ env.DOCKER_TAG }} | awk '{ print $1 }' | xargs -I {} echo docker tag {}:${{ env.DOCKER_TAG }} {}:${{ github.ref_name }} | sed "s,${{ env.REGISTRY_NAMESPACE }},${ECR_REGISTRY}/ps-,2" | bash
export COMPOSE_PROFILES="${COMPOSE_PROFILES},configurator"
REGISTRY_NAMESPACE=${ECR_REGISTRY}/ps- DOCKER_TAG=${{ github.ref_name }} docker compose push
COMPOSE_PROFILES="configurator" REGISTRY_NAMESPACE=${ECR_REGISTRY}/ps- DOCKER_TAG=${{ github.ref_name }} docker compose push
14 changes: 11 additions & 3 deletions databox/api/src/Api/Model/Output/WorkspaceOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,25 @@ class WorkspaceOutput extends AbstractUuidOutput
use CapabilitiesDTOTrait;
use CreatedAtDTOTrait;

#[Groups(['_', Workspace::GROUP_LIST, Workspace::GROUP_READ, Collection::GROUP_LIST, Collection::GROUP_READ])]
#[Groups([
'_',
Workspace::GROUP_LIST,
Workspace::GROUP_READ,
Collection::GROUP_LIST,
Collection::GROUP_READ,
])]
protected array $capabilities = [];

#[Groups([Workspace::GROUP_LIST,
#[Groups([
Workspace::GROUP_LIST,
Workspace::GROUP_READ,
Collection::GROUP_LIST,
Collection::GROUP_READ,
Asset::GROUP_LIST,
Asset::GROUP_READ,
WebhookSerializationInterface::DEFAULT_GROUP,
RenditionDefinition::GROUP_LIST])]
RenditionDefinition::GROUP_LIST,
])]
private string $name;

#[Groups([Workspace::GROUP_LIST, Workspace::GROUP_READ])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace App\Api\OutputTransformer;

use App\Api\Model\Output\WorkspaceOutput;
use App\Entity\Core\Collection;
use App\Entity\Core\Workspace;
use App\Security\Voter\AbstractVoter;
use App\Util\SecurityAwareTrait;
Expand Down Expand Up @@ -45,7 +46,9 @@ public function transform($data, string $outputClass, array &$context = []): obj
}

if ($this->hasGroup([
Workspace::GROUP_READ,
Collection::GROUP_READ,
Collection::GROUP_LIST,
Workspace::GROUP_LIST,
Workspace::GROUP_LIST,
], $context)) {
$output->setCapabilities($this->capCache[$k]);
Expand Down
6 changes: 3 additions & 3 deletions databox/api/src/Entity/Core/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Collection extends AbstractUuidEntity implements SoftDeleteableInterface,
/**
* @var self[]
*/
#[ORM\OneToMany(targetEntity: Collection::class, mappedBy: 'parent')]
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: Collection::class)]
#[ORM\JoinColumn(nullable: true)]
#[MaxDepth(1)]
private ?DoctrineCollection $children = null;
Expand All @@ -120,10 +120,10 @@ class Collection extends AbstractUuidEntity implements SoftDeleteableInterface,
*/
private ?bool $hasChildren = null;

#[ORM\OneToMany(targetEntity: CollectionAsset::class, mappedBy: 'collection', cascade: ['persist'])]
#[ORM\OneToMany(mappedBy: 'collection', targetEntity: CollectionAsset::class, cascade: ['persist'])]
private ?DoctrineCollection $assets = null;

#[ORM\OneToMany(targetEntity: Asset::class, mappedBy: 'referenceCollection')]
#[ORM\OneToMany(mappedBy: 'referenceCollection', targetEntity: Asset::class)]
private ?DoctrineCollection $referenceAssets = null;

#[ORM\ManyToOne(targetEntity: Workspace::class, inversedBy: 'collections')]
Expand Down

0 comments on commit f3e42af

Please sign in to comment.