This commit is contained in:
@ -127,16 +127,6 @@ import org.keycloak.utils.CredentialHelper;
|
|||||||
public class AccountFormService extends AbstractSecuredLocalService
|
public class AccountFormService extends AbstractSecuredLocalService
|
||||||
implements AccountResourceProvider {
|
implements AccountResourceProvider {
|
||||||
|
|
||||||
public static final String THEME_NAME = "account-v1";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean useWithTheme(Theme theme) {
|
|
||||||
log.infof("Attempt to use with theme %s", theme.getName());
|
|
||||||
return ((!Strings.isNullOrEmpty(theme.getName()) && THEME_NAME.equals(theme.getName()))
|
|
||||||
|| (!Strings.isNullOrEmpty(theme.getParentName())
|
|
||||||
&& THEME_NAME.equals(theme.getParentName())));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getResource() {
|
public Object getResource() {
|
||||||
return this;
|
return this;
|
||||||
@ -466,10 +456,10 @@ public class AccountFormService extends AbstractSecuredLocalService
|
|||||||
.event(EventType.UPDATE_PROFILE)
|
.event(EventType.UPDATE_PROFILE)
|
||||||
.client(auth.getClient())
|
.client(auth.getClient())
|
||||||
.user(auth.getUser())
|
.user(auth.getUser())
|
||||||
.detail(Details.CONTEXT, UserProfileContext.ACCOUNT_OLD.name());
|
.detail(Details.CONTEXT, "ACCOUNT_OLD");
|
||||||
|
|
||||||
UserProfileProvider profileProvider = session.getProvider(UserProfileProvider.class);
|
UserProfileProvider profileProvider = session.getProvider(UserProfileProvider.class);
|
||||||
UserProfile profile = profileProvider.create(UserProfileContext.ACCOUNT_OLD, formData, user);
|
UserProfile profile = profileProvider.create(UserProfileContext.ACCOUNT, formData, user);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// backward compatibility with old account console where attributes are not removed if missing
|
// backward compatibility with old account console where attributes are not removed if missing
|
||||||
|
@ -65,7 +65,7 @@ export async function bringInAccountV1(params: { buildOptions: BuildOptionsLike
|
|||||||
pathJoin(accountV1DirPath, "theme.properties"),
|
pathJoin(accountV1DirPath, "theme.properties"),
|
||||||
Buffer.from(
|
Buffer.from(
|
||||||
[
|
[
|
||||||
"accountResourceProvider=org.keycloak.services.resources.account.AccountFormService",
|
"accountResourceProvider=account-v1",
|
||||||
"",
|
"",
|
||||||
"locales=ar,ca,cs,da,de,en,es,fr,fi,hu,it,ja,lt,nl,no,pl,pt-BR,ru,sk,sv,tr,zh-CN",
|
"locales=ar,ca,cs,da,de,en,es,fr,fi,hu,it,ja,lt,nl,no,pl,pt-BR,ru,sk,sv,tr,zh-CN",
|
||||||
"",
|
"",
|
||||||
|
@ -48,7 +48,7 @@ export async function generateJavaStackFiles(params: {
|
|||||||
` <properties>`,
|
` <properties>`,
|
||||||
` <java.version>17</java.version>`,
|
` <java.version>17</java.version>`,
|
||||||
` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>`,
|
` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>`,
|
||||||
` <keycloak.version>999.0.0-SNAPSHOT</keycloak.version>`,
|
` <keycloak.version>23.0.0</keycloak.version>`,
|
||||||
` <guava.version>32.0.0-jre</guava.version>`,
|
` <guava.version>32.0.0-jre</guava.version>`,
|
||||||
` <lombok.version>1.18.28</lombok.version>`,
|
` <lombok.version>1.18.28</lombok.version>`,
|
||||||
` <auto-service.version>1.1.1</auto-service.version>`,
|
` <auto-service.version>1.1.1</auto-service.version>`,
|
||||||
|
@ -66,8 +66,7 @@ export async function main() {
|
|||||||
child_process.execSync("mvn package", { "cwd": buildOptions.keycloakifyBuildDirPath });
|
child_process.execSync("mvn package", { "cwd": buildOptions.keycloakifyBuildDirPath });
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want, however, to test in a container running the latest Keycloak version
|
const containerKeycloakVersion = "23.0.0";
|
||||||
const containerKeycloakVersion = "21.1.2";
|
|
||||||
|
|
||||||
generateStartKeycloakTestingContainer({
|
generateStartKeycloakTestingContainer({
|
||||||
"keycloakVersion": containerKeycloakVersion,
|
"keycloakVersion": containerKeycloakVersion,
|
||||||
|
Reference in New Issue
Block a user