mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-18 10:15:41 +00:00
49 lines
953 B
PHP
49 lines
953 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Entity;
|
||
|
|
|
||
|
|
use ApiPlatform\Metadata\ApiResource;
|
||
|
|
use ApiPlatform\Metadata\Get;
|
||
|
|
use App\Controller\InstanceController;
|
||
|
|
|
||
|
|
#[ApiResource(
|
||
|
|
operations: [
|
||
|
|
new Get(
|
||
|
|
uriTemplate: '/config',
|
||
|
|
controller: InstanceController::class,
|
||
|
|
shortName: 'Configuration',
|
||
|
|
read: false,
|
||
|
|
),
|
||
|
|
]
|
||
|
|
)]
|
||
|
|
class Instance
|
||
|
|
{
|
||
|
|
private ?bool $oauthEnabled = null;
|
||
|
|
|
||
|
|
private ?bool $limitedFeatures = null;
|
||
|
|
|
||
|
|
public function isSsoLogin(): ?bool
|
||
|
|
{
|
||
|
|
return $this->oauthEnabled;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setOauthEnabled(bool $oauthEnabled): static
|
||
|
|
{
|
||
|
|
$this->oauthEnabled = $oauthEnabled;
|
||
|
|
|
||
|
|
return $this;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function isLimitedFeatures(): ?bool
|
||
|
|
{
|
||
|
|
return $this->limitedFeatures;
|
||
|
|
}
|
||
|
|
|
||
|
|
public function setLimitedFeatures(bool $limitedFeatures): static
|
||
|
|
{
|
||
|
|
$this->limitedFeatures = $limitedFeatures;
|
||
|
|
|
||
|
|
return $this;
|
||
|
|
}
|
||
|
|
}
|