1
0
mirror of https://github.com/go-gitea/gitea synced 2024-12-24 03:35:55 +01:00

Add MaxRepoCreation to EditUser API (#2781)

This commit is contained in:
Robin Lambertz 2016-08-11 20:49:31 +02:00 committed by 无闻
parent 7e9b42c87d
commit 5a9709fa9d

@ -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) {