1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

Auth Framework, Part 1

Started buildig the authorization infrastructure to 1. create the
initial admin class to then 2. the Auth manager class can be created to
manage access based on roles.

added number of template files as well just as a UI base to get things
started.

Auth Framework Part 2 will complete the Auth mangager and clean up the
admin area.
This commit is contained in:
Ro
2022-12-12 17:42:40 -08:00
parent 74ae426275
commit 54b5227a0d
23 changed files with 3567 additions and 4 deletions

0
src/Entity/.gitignore vendored Normal file
View File

186
src/Entity/Member.php Normal file
View File

@ -0,0 +1,186 @@
<?php
namespace App\Entity;
use App\Repository\MemberRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: MemberRepository::class)]
class Member
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $uuid = null;
#[ORM\Column(length: 255)]
private ?string $handle = null;
#[ORM\Column(length: 255)]
private ?string $email = null;
#[ORM\Column(length: 255)]
private ?string $password = null;
#[ORM\Column]
private ?bool $active = null;
#[ORM\Column(nullable: true)]
private ?int $role = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $avatar = null;
#[ORM\Column(length: 255)]
private ?string $pronoun = null;
#[ORM\Column(length: 255)]
private ?string $gender = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $lastLogin = null;
public function getId(): ?int
{
return $this->id;
}
public function getUuid(): ?string
{
return $this->uuid;
}
public function setUuid(string $uuid): self
{
$this->uuid = $uuid;
return $this;
}
public function getHandle(): ?string
{
return $this->handle;
}
public function setHandle(string $handle): self
{
$this->handle = $handle;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getRole(): ?int
{
return $this->role;
}
public function setRole(?int $role): self
{
$this->role = $role;
return $this;
}
public function getAvatar(): ?string
{
return $this->avatar;
}
public function setAvatar(?string $avatar): self
{
$this->avatar = $avatar;
return $this;
}
public function getPronoun(): ?string
{
return $this->pronoun;
}
public function setPronoun(string $pronoun): self
{
$this->pronoun = $pronoun;
return $this;
}
public function getGender(): ?string
{
return $this->gender;
}
public function setGender(string $gender): self
{
$this->gender = $gender;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getLastLogin(): ?\DateTimeInterface
{
return $this->lastLogin;
}
public function setLastLogin(\DateTimeInterface $lastLogin): self
{
$this->lastLogin = $lastLogin;
return $this;
}
}