View Issue Details

IDProjectCategoryView StatusLast Update
0004394mantisbtfeaturepublic2004-11-06 06:55
Reporterbpfennig Assigned Tobpfennig  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Fixed in Version0.19.1 
Summary0004394: 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.

TagsNo 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> &nbsp; </td>
+	<td> &nbsp; </td>
+	<td> &nbsp; </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';

patch_0004394.txt (3,080 bytes)   

Relationships

child of 0004297 closedvboctor Mantis 0.19.1 release 

Activities

bpfennig

bpfennig

2004-08-28 04:39

reporter   ~0007267

Anybody there to commit?