<?php
namespace Platform\SecurityBundle\Entity\Access;
use Doctrine\ORM\Mapping as ORM;
/**
* Class SpecialPermissions
*
* @package Platform\SecurityBundle\Entity\Access
* @ORM\Embeddable
*/
class SpecialPermissions
{
/**
* Tracks whether or not the account has "super user" abilities.
*
* @var bool
*
* @ORM\Column(
* type = "boolean",
* nullable = false
* )
*/
protected $superUser = false;
/**
* @return bool
*/
public function isSuperUser(): bool
{
return ($this->superUser === true);
}
/**
* @return bool
*/
public function canImpersonate(): bool
{
return $this->isSuperUser();
}
/**
* @param bool $value
* @return $this
*/
public function setSuperUser($value)
{
$this->superUser = ($value === true);
return $this;
}
}