mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 04:12:56 +00:00
Add additional validation for enterprise configuration inputs
This commit is contained in:
parent
650a27fed1
commit
68b202fbc0
@ -54,6 +54,7 @@ public sealed class EnterpriseEnvironmentService(ILogger<EnterpriseEnvironmentSe
|
|||||||
switch (enterpriseConfigServerUrl)
|
switch (enterpriseConfigServerUrl)
|
||||||
{
|
{
|
||||||
case null when enterpriseConfigId == Guid.Empty:
|
case null when enterpriseConfigId == Guid.Empty:
|
||||||
|
case not null when string.IsNullOrWhiteSpace(enterpriseConfigServerUrl) && enterpriseConfigId == Guid.Empty:
|
||||||
logger.LogInformation("AI Studio runs without an enterprise configuration.");
|
logger.LogInformation("AI Studio runs without an enterprise configuration.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ public sealed class EnterpriseEnvironmentService(ILogger<EnterpriseEnvironmentSe
|
|||||||
logger.LogWarning($"AI Studio runs with an enterprise configuration id ('{enterpriseConfigId}'), but the configuration server URL is not set.");
|
logger.LogWarning($"AI Studio runs with an enterprise configuration id ('{enterpriseConfigId}'), but the configuration server URL is not set.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case not null when enterpriseConfigId == Guid.Empty:
|
case not null when !string.IsNullOrWhiteSpace(enterpriseConfigServerUrl) && enterpriseConfigId == Guid.Empty:
|
||||||
logger.LogWarning($"AI Studio runs with an enterprise configuration server URL ('{enterpriseConfigServerUrl}'), but the configuration ID is not set.");
|
logger.LogWarning($"AI Studio runs with an enterprise configuration server URL ('{enterpriseConfigServerUrl}'), but the configuration ID is not set.");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user