# HG changeset patch # User rejo # Date 1206652234 0 # Node ID df46fd74c2eebb2bbc25890bbfe4d6087207aa6a # Parent 7fef233c99dff7751ba6dd37b0e96b5f2180a26e [feladat @ 205] Bugfix. A user with with at least view access could change user details, including the assigned permission template, for which he did have rights. Reported by Maarten te Paske. diff -r 7fef233c99df -r df46fd74c2ee users.php --- a/users.php Thu Mar 27 20:46:22 2008 +0000 +++ b/users.php Thu Mar 27 21:10:34 2008 +0000 @@ -27,6 +27,8 @@ verify_permission(templ_perm_edit) ? $perm_templ_perm_edit = "1" : $perm_templ_perm_edit = "0" ; verify_permission(is_ueberuser) ? $perm_is_godlike = "1" : $perm_is_godlike = "0" ; +unset($commit_button); + if (isset($_POST['commit'])) { foreach ($_POST['user'] as $user) { update_user_details($user); @@ -53,35 +55,54 @@ } else { $active = ""; } - echo " \n"; - echo " \n"; - echo " \n"; if (($user['uid'] == $_SESSION["userid"] && $perm_edit_own == "1") || ($user['uid'] != $_SESSION["userid"] && $perm_edit_others == "1" )) { + $commit_button = "1"; + + echo " \n"; + echo " \n"; + echo " \n"; echo " \"[\n"; echo " \"[\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + if ($perm_templ_perm_edit == "1") { + echo " \n"; + } else { + echo $user['tpl_name']; + } + echo " \n"; + echo " \n"; + echo " \n"; } else { - echo "  \n"; + echo " \n"; + echo "  \n"; + echo " " . $user['username'] . "\n"; + echo " " . $user['fullname'] . "\n"; + echo " " . $user['descr'] . "\n"; + echo " " . $user['email'] . "\n"; + echo " " . $user['tpl_name'] . "\n"; + if ($active == " checked") { + echo " Yes\n"; + } else { + echo " No\n"; + } + echo " \n"; } - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; } echo " \n"; -echo " \n"; +if ($commit_button) { + echo " \n"; +} echo " \n"; echo "