Compare commits
2
Commits
236cfe44e9
...
3db7d0577a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db7d0577a | ||
|
|
ca160d1543 |
+1
-1
@@ -71,7 +71,7 @@ volumes:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Config details
|
Config details
|
||||||
- SERVER_NAME -> if set to https a SSL cert will be obtained. If you set http, SSL will be disabled.
|
- SERVER_NAME -> if set to https a SSL cert will be obtained. If you set http, SSL will be disabled. (Read more about this [here](https://caddyserver.com/docs/automatic-https))
|
||||||
|
|
||||||
|
|
||||||
Front-end:
|
Front-end:
|
||||||
|
|||||||
@@ -37,9 +37,10 @@ class SecurityController extends AbstractController
|
|||||||
#[Route(path: '/setup', name: 'app_security_addAdmin')]
|
#[Route(path: '/setup', name: 'app_security_addAdmin')]
|
||||||
public function addAdmin(UserPasswordHasherInterface $passwordHasher, EntityManagerInterface $entityManager): Response
|
public function addAdmin(UserPasswordHasherInterface $passwordHasher, EntityManagerInterface $entityManager): Response
|
||||||
{
|
{
|
||||||
$setupStatus = $entityManager->find(ConfigVariable::class, "SETUP_STATUS");
|
$configRepo = $entityManager->getRepository(ConfigVariable::class);
|
||||||
|
$setupStatus = $configRepo->findBy(["key" => "SETUP_STATUS"]);
|
||||||
|
|
||||||
if($setupStatus == null || $setupStatus == 1) {
|
if($setupStatus != null && $setupStatus[0] != null && $setupStatus[0]->getValue() != 1) {
|
||||||
return new Response("Setup was already done");
|
return new Response("Setup was already done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user