Skip to content

Commit

Permalink
Change default page for Manage config submenu
Browse files Browse the repository at this point in the history
When opened, the menu now always displays the Permissions Report page
(adm_permissions_report.php), regardless of the user's access level.

This avoids display of the Configuration Report (which was previsouly
shown by default for users having view_configuration_threshold), as that
page can be quite slow to load and moreover it is often not what admins
want to do in this menu.

Fixes #19992
  • Loading branch information
dregad committed Aug 2, 2015
1 parent d7da926 commit a00053e
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions core/html_api.php
Expand Up @@ -1062,11 +1062,10 @@ function print_manage_menu( $p_page = '' ) {
}

if( access_has_project_level( config_get( 'manage_configuration_threshold' ) ) ) {
if( access_has_global_level( config_get( 'view_configuration_threshold' ) ) ) {
$t_pages['adm_config_report.php'] = array( 'url' => 'adm_config_report.php', 'label' => 'manage_config_link' );
} else {
$t_pages['adm_permissions_report.php'] = array( 'url' => 'adm_permissions_report.php', 'label' => 'manage_config_link' );
}
$t_pages['adm_permissions_report.php'] = array(
'url' => 'adm_permissions_report.php',
'label' => 'manage_config_link'
);
}
# Remove the link from the current page
if( isset( $t_pages[$p_page] ) ) {
Expand Down Expand Up @@ -1119,14 +1118,14 @@ function print_manage_config_menu( $p_page = '' ) {

$t_pages = array();

$t_pages['adm_permissions_report.php'] = array( 'url' => 'adm_permissions_report.php',
'label' => 'permissions_summary_report' );

if( access_has_global_level( config_get( 'view_configuration_threshold' ) ) ) {
$t_pages['adm_config_report.php'] = array( 'url' => 'adm_config_report.php',
'label' => 'configuration_report' );
}

$t_pages['adm_permissions_report.php'] = array( 'url' => 'adm_permissions_report.php',
'label' => 'permissions_summary_report' );

$t_pages['manage_config_work_threshold_page.php'] = array( 'url' => 'manage_config_work_threshold_page.php',
'label' => 'manage_threshold_config' );

Expand Down

0 comments on commit a00053e

Please sign in to comment.