diff options
author | Robin Lambertz <robinlambertz+dev@gmail.com> | 2016-08-11 20:49:31 +0200 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-08-11 11:49:31 -0700 |
commit | 5a9709fa9dfc12e090f18da7b3cea91b9ffa97ad (patch) | |
tree | bc734a0b6d96f1c8622201b9fdb55b3d3802a637 /routers/api/v1/admin | |
parent | 7e9b42c87d2276dec2f1789e1296c2ac51533657 (diff) | |
download | gitea-5a9709fa9dfc12e090f18da7b3cea91b9ffa97ad.tar.gz gitea-5a9709fa9dfc12e090f18da7b3cea91b9ffa97ad.zip |
Add MaxRepoCreation to EditUser API (#2781)
Diffstat (limited to 'routers/api/v1/admin')
-rw-r--r-- | routers/api/v1/admin/user.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index da08862c47..bbf069108c 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -107,6 +107,9 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { if form.AllowImportLocal != nil { u.AllowImportLocal = *form.AllowImportLocal } + if form.MaxRepoCreation != nil { + u.MaxRepoCreation = *form.MaxRepoCreation + } if err := models.UpdateUser(u); err != nil { if models.IsErrEmailAlreadyUsed(err) { |