Implement voting for editor permissions (draft)
This commit is contained in:
@@ -4,14 +4,14 @@ namespace App\Entity;
|
||||
|
||||
use App\RecordInterface;
|
||||
use App\Repository\BibliographyRepository;
|
||||
use App\Repository\CollectionRepository;
|
||||
use App\Repository\CollectorRepository;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use App\RecordStatus;
|
||||
use ContainerBNNizmi\getBibliographyRepositoryService;
|
||||
use Doctrine\Common\Collections\Collection as DoctrineCollection;
|
||||
use Doctrine\DBAL\Query\QueryBuilder as QueryQueryBuilder;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
#[ORM\Entity(repositoryClass: BibliographyRepository::class)]
|
||||
#[ORM\Table(name: 'bibliography')]
|
||||
@@ -64,6 +64,9 @@ class Bibliography implements RecordInterface
|
||||
|
||||
private DoctrineCollection $sites;
|
||||
|
||||
// Checks if the record can be edited by an 'editor' user
|
||||
private bool $isEditable = false;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
@@ -189,4 +192,16 @@ class Bibliography implements RecordInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getEditableStatus(): bool
|
||||
{
|
||||
return $this->isEditable;
|
||||
}
|
||||
|
||||
public function setEditableStatus(bool $status): static
|
||||
{
|
||||
$this->isEditable = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user