Add propper access control for snips with public option
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user