Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0003096mantisbtbugtrackerpublic2007-08-02 02:32
Reportered Assigned Togiallu  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version0.17.5 
Summary0003096: Edit / Delete bug notes
Description

Is there a flag to allow non-admin (ie Manager) to edit/delete all bug notes?

TagsNo tags attached.

Relationships

duplicate of 0008044 closedgiallu Edit/Delete bugnote buttons missing 

Activities

jfitzell

jfitzell

2003-03-28 18:06

reporter   ~0004094

pretty sure there's an access level config option for that... check the config file.

ralfiii

ralfiii

2004-11-09 04:24

reporter   ~0008296

Maybe $g_delete_bugnote_threshold is what you are looking for.

a_crossley

a_crossley

2005-09-16 10:28

reporter   ~0011380

Both $g_update_bugnote_threshold and $g_delete_bugnote_threshold access levels exist and are correctly referenced in bugnote_update.php and bugnote_delete.php respectively.

However neither access level is reference in bugnote_view_inc.php and so the links to Edit or Delete a bug do not show even if you have the access level.

Diff of my fix is:
145c145,152
< }

                          } else {
      if ( access_has_bug_level( config_get( 'update_bugnote_threshold' ), $f_bug_id ) ) {
        print_bracket_link( 'bugnote_edit_page.php?bugnote_id='.$v3_id, lang_get( 'bugnote_edit_link' ) );
      }
      if ( access_has_bug_level( config_get( 'delete_bugnote_threshold' ), $f_bug_id ) ) {
        print_bracket_link( 'bugnote_delete.php?bugnote_id='.$v3_id, lang_get( 'delete_link' ) );
      }
    }
siebrand

siebrand

2005-09-20 03:41

reporter   ~0011397

Last edited: 2005-09-20 03:42

Nasty little bug that I've also identified. In 'Manage -> Workflow Thresholds -> NOTES -> Delete note' the role 'developer' is checked. It is however not posible for those with a role of 'developer' to delete any notes but their own.

I have applied the patch as suggested by bugnote 0011380. It does not work and results in a '[error] PHP Parse error: parse error, unexpected '}' in /usr/local/www/mantis/bugnote_view_inc.php on line 182'.

Here's the unified diff, that's a bit more explicit:

diff -u bugnote_view_inc.php.orig bugnote_view_inc.php
--- bugnote_view_inc.php.orig Tue Sep 20 09:31:26 2005
+++ bugnote_view_inc.php Tue Sep 20 09:36:41 2005
@@ -142,7 +142,14 @@
print_button('bugnote_set_view_state.php?private=0&bugnote_id='.$v3_id, lang_get( 'make_public' ));
} else {
print_button('bugnote_set_view_state.php?private=1&bugnote_id='.$v3_id, lang_get( 'make_private' ));

  • }
  • } else {
    +if ( access_has_bug_level( config_get( 'update_bugnote_threshold' ), $f_bug_id ) ) {
    +print_bracket_link( 'bugnote_edit_page.php?bugnote_id='.$v3_id, lang_get( 'bugnote_edit_link' ) );
    +}
    +if ( access_has_bug_level( config_get( 'delete_bugnote_threshold' ), $f_bug_id ) ) {
    +print_bracket_link( 'bugnote_delete.php?bugnote_id='.$v3_id, lang_get( 'delete_link' ) );
    +}
    +}
    }
    }
    }
a_crossley

a_crossley

2007-06-08 07:24

reporter   ~0014710

This issue still exists in 1.0.6 and in CVS HEAD. Here is the fix I have applied and tested.

diff -u mantis-1.0.6/bugnote_view_inc.php:1.1 mantis-1.0.6/bugnote_view_inc.php:1.3
--- mantis-1.0.6/bugnote_view_inc.php:1.1 Thu Feb 22 10:00:17 2007
+++ mantis-1.0.6/bugnote_view_inc.php Fri Jun 8 12:21:59 2007
@@ -131,6 +131,8 @@
<?php

only admins and the bugnote creator can edit/delete this bugnote

        # bug must be open to be editable
  • users above update_bugnote_threshold should be able to edit this bugnote

  • users above delete_bugnote_threshold should be able to delete this bugnote

        if ( !bug_is_readonly( $f_bug_id ) ) {
            if ( ( access_has_bug_level( config_get( 'manage_project_threshold' ), $f_bug_id ) ) ||
                ( ( $v3_reporter_id == $t_user_id ) && ( ON == config_get( 'bugnote_allow_user_edit_delete' ) ) ) ) {

    @@ -144,7 +146,14 @@
    print_button('bugnote_set_view_state.php?private=1&bugnote_id='.$v3_id, lang_get( 'make_private' ));
    }
    }

  • }
  • } else {
  • if ( access_has_bug_level( config_get( 'update_bugnote_threshold' ), $f_bug_id ) ) {
  • print_button( 'bugnote_edit_page.php?bugnote_id='.$v3_id, lang_get( 'bugnote_edit_link' ) );
  • }
  • if ( access_has_bug_level( config_get( 'delete_bugnote_threshold' ), $f_bug_id ) ) {
  • print_button( 'bugnote_delete.php?bugnote_id='.$v3_id, lang_get( 'delete_link' ) );
  • }
  • }
    }
    ?>
    </span>