[Maintain-dev] [JIRA] Closed: (MNT-1404) Zone -> Remove User FAILS
Frederic Wenzel (JIRA)
jira at osuosl.org
Fri Mar 10 13:01:40 PST 2006
[ http://bugs.osuosl.org/browse/MNT-1404?page=history ]
Frederic Wenzel closed MNT-1404:
--------------------------------
Assign To: Zack Bartel (was: Michael Clay)
Resolution: Cannot Reproduce
Fix Version: 2.4.0
3.0
The issue is not reproduceable in MT3. When the dev version turns stable, there should be no problem anymore.
Also, in MT2.4 it is not reproduceable either. Sorry.
> Zone -> Remove User FAILS
> -------------------------
>
> Key: MNT-1404
> URL: http://bugs.osuosl.org/browse/MNT-1404
> Project: Maintain
> Type: Bug
> Components: Modules
> Versions: 3.0
> Environment:
> ##########################################
> # Session Information
> Array
> (
> [username] => jodell
> [fullname] =>
> [email] => jodell at fullerton.edu
> [ui_size] => 10
> [list_view] => 25
> [last_seen] => 1138746889
> [color_template] => orst_generic
> [host_view] => advanced
> [is_admin] => 1
> [is_zone_admin] => 1
> [is_user] =>
> [is_guest] =>
> [zones] =>
> [preferred_zone] => 1
> [current_zone] =>
> [debug] =>
> [view] =>
> [0] => jodell
> [1] => 209476ae44ea4f52
> [password] => 209476ae44ea4f52
> [2] => mysql
> [type] => mysql
> [3] => 1
> [4] => 10
> [5] => 25
> [6] => 1138746889
> [7] => orst_generic
> [8] => advanced
> [9] =>
> )
> Array
> (
> [id] => 1
> [name] => Default
> [description] =>
> [purgeable] => false
> [comment] =>
> [email] =>
> [notify] => 1
> [object_history] => objecthistory Object
> (
> [id] =>
> [username] =>
> [object_type] => zone
> [object_id] => 1
> [date] =>
> [comment] =>
> )
> )
> http://maintain.fullerton.edu/maintain/bug.php
> ##########################################
> Reporter: James O'Dell
> Assignee: Zack Bartel
> Fix For: 2.4.0, 3.0
>
> Original Estimate: 30 minutes
> Remaining: 30 minutes
>
> As global administrator, removal of users from zones fails
> During troubleshooting I discovered 2 problems
> 1) modules/class/ui.php -> show_select_user()
> Does not provide an 'option value' in the html <form> tag.
> i.e. https://maintain.somewhere.edu/maintain/zone.php?action=edit&zone_id=3
> View-source of the web page shows option value=""
> 2) modules/class/zone.php -> remove_user()
> passes user-id to modules/class/zone.php -> delete_user(), which expects username not userid
> NOTE: there seems to be alot of confusion of passing id verses passing username. I fixed
> it by patching ui.php->show_select_user() to use option value="username", and passing username
> to zone.php->remove_user().
> *** Here is the FIX in diff form *** It took me a week to find/fix
> modules/class/zone.php -> remove_user()
> --- save/zone.php 2006-01-26 12:15:55.000000000 -0800
> +++ zone.php 2006-01-31 14:04:19.000000000 -0800
> @@ -129,12 +129,14 @@
>
>
> elseif ($action == "remove_user") {
> +// JIM
> +// - "$user_id" is actually the "username" to be removed
> +// - I modified modules/class/ui.php to pass username, it was passing blanks
> ensure_admin_credentials($user);
> $zone->delete_user($user_id);
> - $old_user = new User($user_id);
> - $zone->object_history->update($user->username,$old_user->username . " removed");
> + $zone->object_history->update($user->username,$user_id . " removed from $zone->name");
>
> - $conf['ui']->display_confirmation("User Removed",$old_user->username . " has been removed from $zone->name", $conf['web_path'] . "/zone.php?action=show_zone&zone_id=$zone->id");
> + $conf['ui']->display_confirmation("User Removed",$user_id . " has been removed from $zone->name", $conf['web_path'] . "/zone.php?action=show_zone&zone_id=$zone->id");
> } // remove_user
>
> /*!
> modules/class/zone.php -> show_user_select()
> --- save/ui.php 2006-01-27 10:34:32.000000000 -0800
> +++ ui.php 2006-01-31 13:40:00.000000000 -0800
> @@ -776,13 +776,15 @@
> if (!$selected) { echo "<option value=\"0\" SELECTED>Please Choose a User</option>\n"; }
> foreach ($users as $u) {
> if ($selected == $u) {
> - print ("<option value=\"$u->id\" SELECTED>$u->username</option>\n");
> +// JIM print ("<option value=\"$u->id\" SELECTED>$u->username</option>\n");
> + print ("<option value=\"$u->username\" SELECTED>$u->username</option>\n");
> }
> else {
> - print ("<option value=\"$u->id\">$u->username</option>");
> +// JIM print ("<option value=\"$u->id\">$u->username</option>\n");
> + print ("<option value=\"$u->username\">$u->username</option>\n");
> }
> }
> - print ("\n</select>\n");
> + print ("</select>\n");
>
> } //show_user_select
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://bugs.osuosl.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
More information about the Maintain-dev
mailing list