{= # # # # get_basic_data.cfv # # # include "templates.util.base_util"; include "templates.util.rbac.rbac_util"; include "templates.util.encoding"; include "templates.new_profile_wizard.new_profile_wizard_util"; debug_message("\n\n#### get_basic_data.cfv \n"); string session_id = volatile.session_id; bool is_root_admin = get_is_root_admin(); string page_token = v.fp.page_token; # # Check RBAC permissions # if ((is_root_admin or get_admin_feature_permission(session_id, "profiles", "add")) and get_is_valid_page_token(session_id, "new_profile_wizard", page_token)) then ( string licensing_tier = get_licensing_tier(); string profiles_dat = get_all_profiles_dat(); # # # default local log source pathname (ToDo, improve default log source data so that it handles different types!) # # # Note, remembering the local log source pathname is intended to be used by developers only string local_log_source_pathname; if (?("preferences.miscellaneous.remember_local_log_source_pathname") and node_value("preferences.miscellaneous.remember_local_log_source_pathname")) then ( string user_node_name = node_name(volatile.authenticated_user_node_path); string user_info_preferences_path = "users_cache." . user_node_name . ".preferences"; if (?(user_info_preferences_path . ".new_profile_wizard.local_log_source_pathname")) then ( local_log_source_pathname = @(user_info_preferences_path . ".new_profile_wizard.local_log_source_pathname"); ); ); string default_log_source_dat = "{"; default_log_source_dat .= add_json("type", "local", "string"); default_log_source_dat .= add_json("pathname", local_log_source_pathname, "string"); default_log_source_dat = close_json(default_log_source_dat); # # # # Server response # # # string dat = "{"; dat .= add_json("licensingTier", licensing_tier, "string"); dat .= add_json("haveMYSQL", internal.HAVE_MYSQL, "bool"); dat .= add_json("haveODBC", internal.HAVE_ODBC, "bool"); dat .= add_json("profilesDb", profiles_dat, "obj"); dat .= add_json("defaultLogSource", default_log_source_dat, "obj"); dat = close_json(dat); debug_message("#### dat:\n" . dat . "\n"); 'newProfileWizard.getBasicDataResponse(' . dat . ')\n'; ) else ( # No permission to view this resource (URL) display_no_permission_html(); ); =}