View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004394 | mantisbt | feature | public | 2004-08-25 14:39 | 2004-11-06 06:55 |
Reporter | bpfennig | Assigned To | bpfennig | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.19.1 | ||||
Summary | 0004394: Add link to remove all users from project | ||||
Description | It saves time, if you could remove all users from a project with a single click. | ||||
Tags | No tags attached. | ||||
Attached Files | patch_0004394.txt (3,080 bytes)
cvs -z9 diff -u manage_proj_edit_page.php (in directory D:\cvsroot\mantisbt\) Index: manage_proj_edit_page.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/manage_proj_edit_page.php,v retrieving revision 1.79 diff -u -r1.79 manage_proj_edit_page.php --- manage_proj_edit_page.php 14 Jul 2004 22:16:34 -0000 1.79 +++ manage_proj_edit_page.php 25 Aug 2004 18:43:52 -0000 @@ -531,6 +534,22 @@ <?php } # end for ?> + <tr> + <td> </td> + <td> </td> + <td> </td> + <td class="center"> + <?php + # You need global or project-specific permissions to remove users + # from this project + if ( access_has_project_level( config_get( 'project_user_threshold' ), $f_project_id ) ) { + if ( project_includes_user( $f_project_id, $t_user['id'] ) ) { + print_bracket_link( 'manage_proj_user_remove.php?project_id=' . $f_project_id, lang_get( 'remove_all_link' ) ); + } + } + ?> + </td> + </tr> </table> </div> cvs -z9 diff -u manage_proj_user_remove.php (in directory D:\cvsroot\mantisbt\) Index: manage_proj_user_remove.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/manage_proj_user_remove.php,v retrieving revision 1.4 diff -u -r1.4 manage_proj_user_remove.php --- manage_proj_user_remove.php 11 Jan 2004 07:16:07 -0000 1.4 +++ manage_proj_user_remove.php 25 Aug 2004 18:34:30 -0000 @@ -12,7 +12,7 @@ <?php require_once( 'core.php' ) ?> <?php $f_project_id = gpc_get_int( 'project_id' ); - $f_user_id = gpc_get_int( 'user_id' ); + $f_user_id = gpc_get_int( 'user_id', null ); # We should check both since we are in the project section and an # admin might raise the first threshold and not realize they need @@ -20,7 +20,12 @@ access_ensure_project_level( config_get( 'manage_project_threshold' ), $f_project_id ); access_ensure_project_level( config_get( 'project_user_threshold' ), $f_project_id ); - project_remove_user( $f_project_id, $f_user_id ); + if ( null == $f_user_id ) { + project_remove_all_users( $f_project_id ); + } + else { + project_remove_user( $f_project_id, $f_user_id ); + } print_header_redirect( 'manage_proj_edit_page.php?project_id=' . $f_project_id ); ?> cvs -z9 diff -u strings_english.txt (in directory D:\cvsroot\mantisbt\lang\) Index: strings_english.txt =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v retrieving revision 1.204 diff -u -r1.204 strings_english.txt --- strings_english.txt 21 Aug 2004 13:52:18 -0000 1.204 +++ strings_english.txt 25 Aug 2004 18:42:35 -0000 @@ -795,8 +796,10 @@ # proj_user_menu_page.php $s_add_user_title = 'Add user to project'; $s_add_user_button = 'Add User'; $s_add_user_with_default_rights_button = 'Add users with their default access level'; $s_project_selection_title = 'Project Selection'; $s_remove_link = 'Remove'; +$s_remove_all_link = 'Remove all'; # proj_user_update.php $s_updated_user_msg = 'Successfully updated user'; | ||||