summaryrefslogtreecommitdiffstats
path: root/routers/admin/users.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-05-31 07:18:11 +0100
committerGitHub <noreply@github.com>2021-05-31 02:18:11 -0400
commit3183a465d71a13535e52589bb85b987176872fcd (patch)
tree03d1cb88627176f35e168cda5e46df197dcc3110 /routers/admin/users.go
parent518ed504ef8714eeac126fc59ff57f50a98e3692 (diff)
downloadgitea-3183a465d71a13535e52589bb85b987176872fcd.tar.gz
gitea-3183a465d71a13535e52589bb85b987176872fcd.zip
Make modules/context.Context a context.Context (#16031)
* Make modules/context.Context a context.Context Signed-off-by: Andrew Thornton <art27@cantab.net> * Simplify context calls Signed-off-by: Andrew Thornton <art27@cantab.net> * Set the base context for requests to the HammerContext Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'routers/admin/users.go')
-rw-r--r--routers/admin/users.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/admin/users.go b/routers/admin/users.go
index 3b29eeefc1..a71a11dd8a 100644
--- a/routers/admin/users.go
+++ b/routers/admin/users.go
@@ -113,7 +113,7 @@ func NewUserPost(ctx *context.Context) {
ctx.RenderWithErr(password.BuildComplexityError(ctx), tplUserNew, &form)
return
}
- pwned, err := password.IsPwned(ctx.Req.Context(), form.Password)
+ pwned, err := password.IsPwned(ctx, form.Password)
if pwned {
ctx.Data["Err_Password"] = true
errMsg := ctx.Tr("auth.password_pwned")
@@ -256,7 +256,7 @@ func EditUserPost(ctx *context.Context) {
ctx.RenderWithErr(password.BuildComplexityError(ctx), tplUserEdit, &form)
return
}
- pwned, err := password.IsPwned(ctx.Req.Context(), form.Password)
+ pwned, err := password.IsPwned(ctx, form.Password)
if pwned {
ctx.Data["Err_Password"] = true
errMsg := ctx.Tr("auth.password_pwned")