-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e413bfe
commit 7cf2375
Showing
13 changed files
with
115 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,6 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 | |
|
||
###> symfony/mailer ### | ||
# MAILER_DSN=null://null | ||
MAILER_SENDER_EMAIL=[email protected] | ||
###< symfony/mailer ### | ||
|
||
###> nelmio/cors-bundle ### | ||
|
@@ -57,6 +56,10 @@ JWT_PASSPHRASE=827c9f8cce8bb82e75b2aec4a14a61f572ac28c7a8531f08dcdf1652573a7049 | |
LOCK_DSN=flock | ||
###< symfony/lock ### | ||
|
||
|
||
MAILER_SENDER_EMAIL=[email protected] | ||
LIMITED_FEATURES=false | ||
OAUTH_ENABLED=false | ||
OAUTH_CLIENT_ID= | ||
OAUTH_CLIENT_SECRET= | ||
OAUTH_AUTHORIZATION_URL= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use App\Entity\Instance; | ||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
|
||
class InstanceController extends AbstractController | ||
{ | ||
public function __invoke(): Instance | ||
{ | ||
$instance = new Instance(); | ||
|
||
$instance | ||
->setLimitedFeatures($this->getParameter('limited_features') ?? false) | ||
->setOauthEnabled($this->getParameter('oauth_enabled')); | ||
|
||
return $instance; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters