mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-14 07:21:31 +00:00
Use a special form type for api key settings, that hide the api key by default as dots
This commit is contained in:
parent
a75a60fecd
commit
f48791e961
16 changed files with 191 additions and 12 deletions
|
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Settings\InfoProviderSystem;
|
||||
|
||||
use App\Form\Type\APIKeyType;
|
||||
use App\Settings\SettingsIcon;
|
||||
use Jbtronics\SettingsBundle\Metadata\EnvVarMode;
|
||||
use Jbtronics\SettingsBundle\Settings\Settings;
|
||||
|
|
@ -43,6 +44,7 @@ class OEMSecretsSettings
|
|||
"NZD", "RUB", "SEK", "SGD", "TWD", "USD"];
|
||||
|
||||
#[SettingsParameter(label: new TM("settings.ips.element14.apiKey"),
|
||||
formType: APIKeyType::class,
|
||||
envVar: "PROVIDER_OEMSECRETS_KEY", envVarMode: EnvVarMode::OVERWRITE)]
|
||||
public ?string $apiKey = null;
|
||||
|
||||
|
|
@ -85,4 +87,4 @@ class OEMSecretsSettings
|
|||
|
||||
return OEMSecretsSortMode::tryFrom($value) ?? OEMSecretsSortMode::NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue