# # # build_config_navbar() # # # This subroutine builds the config menu. subroutine(build_config_navbar( bool is_root_admin, bool is_lite, node super_role_config, string profile_name, string active_page), ( debug_message("\n#### build_config_navbar() START \n"); # debug_message("#### is_root_admin: " . is_root_admin . "\n"); # debug_message("#### is_lite: " . is_lite . "\n"); # debug_message("#### active_page: " . active_page . "\n"); # debug_message("#### super_role_config:\n" . node_as_string(super_role_config) ."\n"); node item; string feature_name; # # # Get final config navbar node # # node config_navbar; if (is_root_admin and !is_lite) then ( config_navbar = "templates.config_pages.config_navbar.pro_enterprise"; ) else if (!is_lite) then ( # Handle RBAC permissions # We clone the pro_enterprise config_navbar node to v.my_config_navbar # because we delete any navbar item where the user has no permission delete_node("v.my_config_navbar"); v.my_config_navbar = ""; clone_node("templates.config_pages.config_navbar.pro_enterprise", "v.my_config_navbar"); config_navbar = "v.my_config_navbar"; foreach item config_navbar ( feature_name = node_name(item); if ((feature_name ne active_page) and !super_role_config?{feature_name}) then ( delete_node(item); ); ); ) else ( # Lite version config_navbar = "templates.config_pages.config_navbar.lite"; ); # # # Start building the navbar # # # We show the More Options link if there are more than 9 config navbar items, # in this case we display maximum 7 items (or 8 items if the active page is form More Options) # and hide all other items in the More Options menu '
'; # admin_config_navbar # Drop down ' '; ) else ( ''; # admin_config_navbar ); debug_message("\n#### build_config_navbar() END \n"); ));