logo       

mantisbt/core access_api.php,1.42,1.43: msg#00029

Subject: mantisbt/core access_api.php,1.42,1.43
Update of /cvsroot/mantisbt/mantisbt/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3020/core

Modified Files:
        access_api.php 
Log Message:
fixed per bug access check when threshold is an array and limit_reporters is on


Index: access_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/access_api.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- access_api.php      7 Apr 2005 22:44:54 -0000       1.42
+++ access_api.php      12 May 2005 16:04:09 -0000      1.43
@@ -316,13 +316,13 @@
                    $p_user_id = auth_get_current_user_id();
                }
 
+               $t_project_id = bug_get_field( $p_bug_id, 'project_id' );
                # check limit_Reporter (Issue #4769)
                # reporters can view just issues they reported
                $t_limit_reporters = config_get( 'limit_reporters' );
-               $t_report_bug_threshold = config_get( 'report_bug_threshold' );
-               if ( (ON === $t_limit_reporters) &&
-                    (!bug_is_user_reporter( $p_bug_id, $p_user_id )) &&
-                    ( current_user_get_access_level() <= 
$t_report_bug_threshold ) ) {
+               if ( ( ON === $t_limit_reporters ) &&
+                    ( !bug_is_user_reporter( $p_bug_id, $p_user_id ) ) &&
+                    ( !access_has_project_level( REPORTER + 1, $t_project_id, 
$p_user_id ) ) ) {
                  return false;
                }
 
@@ -333,8 +333,6 @@
                        $p_access_level = max( $p_access_level, config_get( 
'private_bug_threshold' ) );
                }
 
-               $t_project_id = bug_get_field( $p_bug_id, 'project_id' );
-
                return access_has_project_level( $p_access_level, 
$t_project_id, $p_user_id );
        }
 



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe