*** bug_report.php.orig Wed Jul 13 04:06:43 2011 --- bug_report.php Wed Jul 13 05:12:25 2011 *************** *** 34,39 **** --- 34,55 ---- form_security_validate( 'bug_report' ); + /* 0013140 cloned bug gets access of its project, not current project */ + $f_master_bug_id = gpc_get_int( 'm_id', 0 ); + if ( $f_master_bug_id > 0 ) { + bug_ensure_exists( $f_master_bug_id ); + if ( bug_is_readonly( $f_master_bug_id ) ) { + error_parameters( $f_master_bug_id ); + trigger_error( ERROR_BUG_READ_ONLY_ACTION_DENIED, ERROR ); + } + $t_bug = bug_get( $f_master_bug_id, true ); + access_ensure_bug_level( config_get( 'update_bug_threshold', null, null, $t_bug->project_id ), $f_master_bug_id ); + if( $t_bug->project_id != helper_get_current_project() ) { + $g_project_override = $t_bug->project_id; + } + } + /* 0013140 cloned bug gets access of its project, not current project */ + access_ensure_project_level( config_get('report_bug_threshold' ) ); $t_bug_data = new BugData; *** bug_report_page.php.orig Wed Jul 13 05:11:07 2011 --- bug_report_page.php Wed Jul 13 05:11:43 2011 *************** *** 56,62 **** $t_bug = bug_get( $f_master_bug_id, true ); # the user can at least update the master bug (needed to add the relationship)... ! access_ensure_bug_level( config_get( 'update_bug_threshold', null, $t_bug->project_id ), $f_master_bug_id ); #@@@ (thraxisp) Note that the master bug is cloned into the same project as the master, independent of # what the current project is set to. --- 56,62 ---- $t_bug = bug_get( $f_master_bug_id, true ); # the user can at least update the master bug (needed to add the relationship)... ! access_ensure_bug_level( config_get( 'update_bug_threshold', null, null, $t_bug->project_id ), $f_master_bug_id ); #@@@ (thraxisp) Note that the master bug is cloned into the same project as the master, independent of # what the current project is set to.