Skip to content

Commit

Permalink
Fixed the access level checks to be more accurate.
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@765 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
Kenzaburo Ito committed Mar 6, 2002
1 parent cd5799e commit 347d3b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core_user_API.php
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Expand Up @@ -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.
Expand Down

0 comments on commit 347d3b5

Please sign in to comment.