diff --git a/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl b/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl index 0241c053..6721a91a 100644 --- a/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl +++ b/src/bin/keycloakify/generateFtl/ftl_object_to_js_code_declaring_an_object.ftl @@ -408,6 +408,14 @@ out["themeName"] = "KEYCLOAKIFY_THEME_NAME_cXxKd3xEer"; out["pageId"] = "${pageId}"; + try { + + out["url"]["resourcesCommonPath"] = out["url"]["resourcesPath"] + "/" + "RESOURCES_COMMON_cLsLsMrtDkpVv"; + + } catch(error) { + + } + return out; })() @@ -423,7 +431,7 @@ <#if isHash> <#if path?size gt 10> - <#return "ABORT: Too many recursive calls"> + <#return "ABORT: Too many recursive calls, path: " + path?join(".")> <#local keys = ""> @@ -481,13 +489,14 @@ !["name", "displayName", "displayNameHtml", "internationalizationEnabled", "registrationEmailAsUsername" ]?seq_contains(key) ) || ( "applications.ftl" == pageId && - are_same_path(path, ["applications", "applications", "*", "client", "realm"]) - ) || ( - "applications.ftl" == pageId && - "masterAdminClient" == key + is_subpath(path, ["applications", "applications"]) && + ( + key == "realm" || + key == "container" + ) ) > - <#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]> + <#local out_seq += ["/*If you need '" + path?join(".") + "." + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]> <#continue> @@ -656,9 +665,9 @@ <#return "ABORT: Couldn't convert into string non hash, non method, non boolean, non enumerable object"> -<#function are_same_path path searchedPath> +<#function is_subpath path searchedPath> - <#if path?size != searchedPath?size> + <#if path?size < searchedPath?size> <#return false> @@ -666,8 +675,14 @@ <#list path as property> + <#if i == searchedPath?size > + <#continue> + + <#local searchedProperty=searchedPath[i]> + <#local i+= 1> + <#if searchedProperty?is_string && searchedProperty == "*"> <#continue> @@ -684,11 +699,13 @@ <#return false> - <#local i+= 1> - <#return true> + +<#function are_same_path path searchedPath> + <#return path?size == searchedPath?size && is_subpath(path, searchedPath)> + \ No newline at end of file