Skip to content

Commit

Permalink
fix(user): fixed some user account quirks
Browse files Browse the repository at this point in the history
  • Loading branch information
zZHorizonZz committed Aug 22, 2024
1 parent 4d04784 commit 91532b9
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package dev.cloudeko.zenei.user.deployment;

import dev.cloudeko.zenei.user.UserAccountRepositoryBase;
import dev.cloudeko.zenei.user.runtime.BasicUserAccountInitializer;
import dev.cloudeko.zenei.user.runtime.BasicUserAccountManager;
import dev.cloudeko.zenei.user.runtime.BasicUserAccountRecorder;
Expand Down Expand Up @@ -32,7 +31,7 @@ public class BasicUserAccountManagerProcessor {

@BuildStep
@Record(STATIC_INIT)
SyntheticBeanBuildItem createDbTokenStateInitializerProps(BasicUserAccountRecorder recorder, Capabilities capabilities) {
SyntheticBeanBuildItem createBasicUserInitializerConfig(BasicUserAccountRecorder recorder, Capabilities capabilities) {
final String reactiveClient = capabilities.getCapabilities().stream()
.filter(c -> Arrays.asList(SUPPORTED_REACTIVE_CLIENTS).contains(c))
.findFirst()
Expand Down Expand Up @@ -92,8 +91,8 @@ SyntheticBeanBuildItem createDbTokenStateInitializerProps(BasicUserAccountRecord
return SyntheticBeanBuildItem
.configure(BasicUserAccountInitializer.UserAccountInitializerProperties.class)
.supplier(recorder.createUserAccountInitializerProps(createTableDdl, supportsIfTableNotExists))
.unremovable()
.scope(Dependent.class)
.unremovable()
.done();
}

Expand All @@ -104,7 +103,7 @@ AdditionalBeanBuildItem createBasicUserAccountInitializerBean() {

@BuildStep
@Record(STATIC_INIT)
SyntheticBeanBuildItem syntheticBeanBuildItem(BasicUserAccountRecorder recorder, Capabilities capabilities) {
SyntheticBeanBuildItem createBasicUserAccountRepository(BasicUserAccountRecorder recorder, Capabilities capabilities) {
final String reactiveClient = capabilities.getCapabilities().stream()
.filter(c -> Arrays.asList(SUPPORTED_REACTIVE_CLIENTS).contains(c))
.findFirst()
Expand All @@ -116,10 +115,9 @@ SyntheticBeanBuildItem syntheticBeanBuildItem(BasicUserAccountRecorder recorder,

return SyntheticBeanBuildItem
.configure(BasicUserAccountRepository.class)
.addType(UserAccountRepositoryBase.class)
.unremovable()
.scope(Singleton.class)
.supplier(recorder.createBasicUserAccountRepository(config))
.scope(Singleton.class)
.unremovable()
.done();
}

Expand Down

0 comments on commit 91532b9

Please sign in to comment.