From b392926cb5dc5917642bdd9325c1fe076c821969 Mon Sep 17 00:00:00 2001 From: Julian Fitzell Date: Sun, 27 Oct 2002 00:04:38 +0000 Subject: [PATCH] allow reporters to reopen their own bugs if they are unhappy with the resolution This option defaults to on and is in response to isse #2108 (http://mantisbt.sourceforge.net/mantis/view_bug_advanced_page.php?f_id=0002108) git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@1593 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- bug_reopen.php | 8 +++++--- bug_reopen_page.php | 8 +++++--- bug_view_advanced_page.php | 2 +- bug_view_page.php | 2 +- config_defaults_inc.php | 4 ++++ doc/ChangeLog | 1 + 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/bug_reopen.php b/bug_reopen.php index 6872502e8f..5467424af9 100644 --- a/bug_reopen.php +++ b/bug_reopen.php @@ -6,7 +6,7 @@ # See the README and LICENSE files for details # -------------------------------------------------------- - # $Id: bug_reopen.php,v 1.22 2002-10-23 04:54:44 jfitzell Exp $ + # $Id: bug_reopen.php,v 1.23 2002-10-27 00:04:38 jfitzell Exp $ # -------------------------------------------------------- ?> @@ -15,8 +15,10 @@ $f_bug_id = gpc_get_int( 'f_bug_id' ); project_access_check( $f_bug_id ); - check_access( config_get( 'reopen_bug_threshold ' ) ); - bug_ensure_exists( $f_bug_id ); + if ( OFF == config_get( 'allow_reporter_reopen' ) + || auth_get_current_user_id() != bug_get_field( $f_bug_id, 'reporter_id' ) ) { + check_access( config_get( 'reopen_bug_threshold' ) ); + } ?> diff --git a/bug_view_advanced_page.php b/bug_view_advanced_page.php index 4703b84109..374bf62f76 100644 --- a/bug_view_advanced_page.php +++ b/bug_view_advanced_page.php @@ -411,7 +411,7 @@ = RESOLVED ) && ( access_level_check_greater_or_equal( $g_reopen_bug_threshold ) || - ( $v_reporter_id == $t_user_id )) ) { ?> + ( $v_reporter_id == $t_user_id && ON == config_get( 'allow_reporter_reopen' ) ) ) ) { ?>
diff --git a/bug_view_page.php b/bug_view_page.php index e08f2b25ac..fcd69f4288 100644 --- a/bug_view_page.php +++ b/bug_view_page.php @@ -317,7 +317,7 @@ = RESOLVED ) && ( access_level_check_greater_or_equal( $g_reopen_bug_threshold ) || - ( $v_reporter_id == $t_user_id )) ) { ?> + ( $v_reporter_id == $t_user_id && ON == config_get( 'allow_reporter_reopen' ) ) ) ) { ?> diff --git a/config_defaults_inc.php b/config_defaults_inc.php index f842057f53..6c12f5c554 100644 --- a/config_defaults_inc.php +++ b/config_defaults_inc.php @@ -491,6 +491,10 @@ # Allow reporters to close the bugs they reported, after they're marked resolved. $g_allow_reporter_close = OFF; + # --- reporter can reopen --------- + # Allow reporters to reopen the bugs they reported, after they're marked resolved. + $g_allow_reporter_reopen = ON; + # --- bug delete ----------- # Allow the specified access level and higher to delete bugs $g_allow_bug_delete_access_level = DEVELOPER; diff --git a/doc/ChangeLog b/doc/ChangeLog index fc0624f536..c44a25f02b 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -136,6 +136,7 @@ Mantis ChangeLog * Added $g_email_set_category to make Mantis set the category of the e-mail sent (via mail()/phpMailer). This is useful in organising e-mails better using clients like Microsoft Outlook. * config options default_advanced_report, default_advanced_view, and default_advanced_update are now ON/OFF instead of BOTH/SIMPLE/ADVANCED (they never worked the other way anyway) * Added a custom_headers config variable that included a list of headers to preprend to each outgoing HTTP response. This can be used for P3P policy headers among other things (see issue #2649) + * Added a allow_reporter_reopen config variable that allows reporters to reopen closed bugs that they reported if they are unhappy with the resolution (defaults to ON) (see issue #2108) 2002.08.23 - 0.17.5 * Corrected bug_delete.php and bug_delete_page.php, which ignored the $g_allow_bug_delete_access_level setting.