-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Filter by Role to user search #1278
base: dev
Are you sure you want to change the base?
Conversation
Your Testserver will be ready at https://1278.test.live.mm.rbg.tum.de in a few minutes. Logins
|
There's a small problem: after filtering, the user's email doesn't seem to be displayed |
Filtering locally results in no show of potential results. Simplest case of this is filtering for students without query string. Change the API instead. |
I cannot reproduce this problem in Mozilla Firefox for Ubuntu 132.0.2 (64-Bit) or Google Chrome Version 130.0.6723.58 (Official Build) (64-bit). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, just added two remarks
Co-authored-by: Joscha Henningsen <[email protected]>
users, err = r.UsersDao.SearchUser(q) | ||
role, err := strconv.ParseUint(rQ, 10, 64) | ||
if err != nil && rQ != "" && rQ != "-1" { | ||
tools.RenderErrorPage(c, http.StatusBadRequest, "invalid role") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API endpoints should not render HTML pages on error but rather use
Line 31 in 95804eb
_ = c.AbortWithError(http.StatusForbidden, tools.RequestError{ |
Motivation and Context
You can now filter users by their role, improves administration and overview over admins.
Steps for Testing
Prerequisites:
Screenshots