Add propper access control for snips with public option

This commit is contained in:
Tim
2023-04-05 00:02:47 +02:00
parent 607435bff0
commit 693f83ca4a
8 changed files with 117 additions and 4 deletions

View File

@ -19,6 +19,9 @@ class Snip
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column]
private ?bool $public = null;
public function __toString(): string
{
return $this->name ?? '';
@ -40,4 +43,16 @@ class Snip
return $this;
}
public function isPublic(): ?bool
{
return $this->public;
}
public function setPublic(bool $public): self
{
$this->public = $public;
return $this;
}
}