From 347d3b558d053f31e5c8883ccf3678fc97cb51d0 Mon Sep 17 00:00:00 2001 From: Kenzaburo Ito Date: Wed, 6 Mar 2002 05:18:38 +0000 Subject: [PATCH] Fixed the access level checks to be more accurate. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@765 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- core_user_API.php | 9 +++++---- doc/ChangeLog | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/core_user_API.php b/core_user_API.php index 8e8c0237a6..dafaea5c5f 100644 --- a/core_user_API.php +++ b/core_user_API.php @@ -322,7 +322,10 @@ function access_level_check_equal( $p_access_level ) { $t_access_level = get_current_user_field( "access_level" ); $t_access_level2 = get_project_access_level(); - if ( ( $t_access_level == $p_access_level ) || ( $t_access_level2 == $p_access_level ) ) { + if ( $t_access_level2 == $p_access_level ) { + return true; + } else if ( ( $t_access_level == $p_access_level ) && + ( -1 == $t_access_level2 ) ) { return true; } else { return false; @@ -343,9 +346,7 @@ function access_level_check_greater_or_equal( $p_access_level ) { # use the project level access level instead of the global access level # if the project level is not specified then use the global access level - if ( -1 == $t_access_level2 ) { - # do nothing - } else if ( $t_access_level2 > $t_access_level ) { + if ( -1 != $t_access_level2 ) { $t_access_level = $t_access_level2; } diff --git a/doc/ChangeLog b/doc/ChangeLog index 04f3e53f8b..bea3b8e158 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -23,6 +23,7 @@ Mantis * Fixed file upload switch with break statements. * Fixed print_assign_to_option_list() to accurately reflect settings. * Fixed print_reporter_option_list() to accurately reflect settings. + * Fixed the access level checks to be more accurate. * Removed site_settings link in print_manage_doc_menu(). * Renamed doc/CONFIGURATION to doc/CUSTOMIZATION. * Modified edit user links to use the username instead of the [edit] link.