4 * Group Admin page to confirm removal of user from group
6 * This page is called from Project/Foundry Admins when admin requests
7 * removal of a developer. This page checks whether it is possible
8 * to remove one, if no, shows decription why not, else presents
9 * admin with the confirmation form. Results of this form are submitted
10 * back to calling Project/Foundry Admin page (i.e. very removal is
11 * performed there). Since Project/Foundry Admins use slightly different
12 * parameter passing interface, there's a bit of dirty magic here.
14 * SourceForge: Breaking Down the Barriers to Open Source Development
15 * Copyright 1999-2001 (c) VA Linux Systems
16 * http://sourceforge.net
22 require_once('pre.php');
23 require_once('www/project/admin/project_admin_utils.php');
25 session_require(array('group'=>$group_id));
27 $group =& group_get_object($group_id);
28 exit_assert_object($group, 'Group');
30 // Do some text substitutions below
31 if ($group->getType()==2) {
33 // foundries hate explicit group_id
34 $passed_group_id = '';
37 $passed_group_id = '<input type="hidden" name="group_id" value="'.$group_id.'">';
40 // Need to check if user being removed is admin
41 $rm_user =& user_get_object($rm_id);
42 exit_assert_object($rm_user, 'User');
43 $perm = $group->getPermission($rm_user);
45 if ($perm->isAdmin()) {
47 'Operation Not Permitted',
48 'You cannot remove '.$type.' admin.'
53 project_admin_header(array('title'=>"Project Admin: ".group_getname($group_id),'group'=>$group_id));
57 <h3>Removing Developer from <?php echo ucfirst($type); ?></h3>
59 You are about to remove developer from the <?php echo $type; ?>. Please
66 <form action="<?php echo $return_to; ?>" method="POST">
67 <input type="hidden" name="func" value="rmuser">
68 <?php echo $passed_group_id; ?>
69 <input type="hidden" name="rm_id" value="<?php echo $rm_id; ?>">
70 <input type="submit" value="Remove">
75 <form action="<?php echo $return_to; ?>" method="GET">
76 <?php echo $passed_group_id; ?>
77 <input type="submit" value="Cancel">
85 project_admin_footer(array());