Update login component password and rename run configurations for development

This commit is contained in:
Christian Werner 2025-11-09 20:46:40 +01:00
parent afc7662a62
commit b1f5356954
4 changed files with 15 additions and 6 deletions

View File

@ -21,7 +21,7 @@ export class LoginComponent {
protected loginFormGroup = new FormGroup({ protected loginFormGroup = new FormGroup({
usernameOrEmail: new FormControl('housemaster'), usernameOrEmail: new FormControl('housemaster'),
password: new FormControl('W33PWO6IIRpkc6VSBIY0'), password: new FormControl('kR0pNCspBKx8lOzAIch5'),
keepSignedIn: new FormControl(false), keepSignedIn: new FormControl(false),
}); });

View File

@ -1,8 +1,9 @@
<component name="ProjectRunConfigurationManager"> <component name="ProjectRunConfigurationManager">
<configuration default="false" name="Gandalf" type="CompoundRunConfigurationType"> <configuration default="false" name="Dev" type="CompoundRunConfigurationType">
<toRun name="Suspectus.Gandalf.Mithrandir.Api: http" type="LaunchSettings" /> <toRun name="Suspectus.Gandalf.Mithrandir.Api: http" type="LaunchSettings" />
<toRun name="Suspectus.Gandalf.Palantir.Api: http" type="LaunchSettings" /> <toRun name="Suspectus.Gandalf.Palantir.Api: http" type="LaunchSettings" />
<toRun name="start" type="js.build_tools.npm" /> <toRun name="frontend debug" type="JavascriptDebugType" />
<toRun name="frontend" type="js.build_tools.npm" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
</component> </component>

View File

@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="frontend debug" type="JavascriptDebugType" uri="http://localhost:4200">
<method v="2" />
</configuration>
</component>

View File

@ -25,18 +25,20 @@ public class InitService
private readonly IConfiguration _configuration; private readonly IConfiguration _configuration;
private readonly ILogger<InitService> _logger; private readonly ILogger<InitService> _logger;
private readonly InvokerContext _invokerContext; private readonly InvokerContext _invokerContext;
private readonly IWebHostEnvironment _environment;
private long _masterSubjectId; private long _masterSubjectId;
private long _masterTenantId; private long _masterTenantId;
private long _masterAppId; private long _masterAppId;
public InitService(ApplicationContext applicationContext, IMediator mediator, IConfiguration configuration, ILogger<InitService> logger, InvokerContext invokerContext) public InitService(ApplicationContext applicationContext, IMediator mediator, IConfiguration configuration, ILogger<InitService> logger, InvokerContext invokerContext, IWebHostEnvironment environment)
{ {
_applicationContext = applicationContext; _applicationContext = applicationContext;
_mediator = mediator; _mediator = mediator;
_configuration = configuration; _configuration = configuration;
_logger = logger; _logger = logger;
_invokerContext = invokerContext; _invokerContext = invokerContext;
_environment = environment;
} }
@ -89,8 +91,9 @@ public class InitService
return; return;
} }
var masterTenantPassword = GeneratePassword(); var masterTenantPassword = _environment.IsDevelopment() ? "kR0pNCspBKx8lOzAIch5" : GeneratePassword();
var masterTenantPasswordHashResult = await _mediator.Send(new HashPasswordCommand { RawPassword = masterTenantPassword }); var masterTenantPasswordHashResult = await _mediator.Send(new HashPasswordCommand { RawPassword = masterTenantPassword });
if (masterTenantPasswordHashResult.IsFaulted) if (masterTenantPasswordHashResult.IsFaulted)