Closed Bug 331529 Opened 18 years ago Closed 11 years ago

editusers list should let me search for disabled users

Categories

(Bugzilla :: Administration, task)

2.17.7
task
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 5.0

People

(Reporter: timeless, Assigned: sjoshi)

References

Details

Attachments

(1 file, 2 obsolete files)

I have administrator privs on a bugzilla and i want to look for disabled users.

steps:
1. load edit users.
2. try to find the list of disabled users.
3. search for all users instead.
4. click the button to view the list

expected results:
at the bottom of editusers in bugzilla is a list of groups to which i can restrict my search, i'd like that list to include "disabled".

actual results:
search is much more painful.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
I want exactly the opposite;-) look only for not disabled users and unfortunaltely have many disabled users in my bugzilla.

So if this issue is done, I'd suggest also to add a possibility to hide disabled users. 

So maybe instead of using the groups list, an additinal checkbox "Restrict search to" and a list box "enabled"/"disabled" users could be added.
(In reply to Christoph Späth from comment #1)
> I want exactly the opposite;-) look only for not disabled users

This is bug 315451.
Attached patch Patch-v1 (obsolete) — Splinter Review
This fix has also changed the approach taken in Bug 315451
Assignee: administration → joshi_sunil
Status: NEW → ASSIGNED
Attachment #795139 - Flags: review?(simon)
Comment on attachment 795139 [details] [diff] [review]
Patch-v1

>+            my $userstatus = scalar $cgi->param('userstatus');
>+            detaint_natural($userstatus);
>+            $query .= " $nextCondition profiles.is_enabled = ?";
>             $nextCondition = 'AND';
>+            push(@bindValues, $userstatus);

You must validate user data. Simply calling detaint_natural() is not enough (I could pass a string to abuse Bugzilla). A safer approach would be to do:

$userstatus = $cgi->param('userstatus') ? 1 : 0;

I'm not a fan of the name "userstatus". Maybe $is_enabled would be better.
Attachment #795139 - Flags: review?(simon) → review-
Attached patch Patch-v2 (obsolete) — Splinter Review
Review comments incorporated.
Attachment #795139 - Attachment is obsolete: true
Attachment #795142 - Flags: review?(simon)
Comment on attachment 795142 [details] [diff] [review]
Patch-v2

Rather than a checkbox and a drop down, I think it should be one drop down with three options:

All users
Enabled users only (and selected by default)
Disabled users only
Attachment #795142 - Flags: review?(simon) → review-
Attached patch Patch-v3Splinter Review
Removing Checkbox
Attachment #795142 - Attachment is obsolete: true
Attachment #797264 - Flags: review?(simon)
Attachment #797264 - Flags: review?(simon) → review+
Flags: approval?
Target Milestone: --- → Bugzilla 5.0
Flags: approval? → approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                       
modified editusers.cgi
modified template/en/default/admin/users/search.html.tmpl
Committed revision 8727.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Blocks: 1201026
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: