Add MaxRepoCreation to EditUser API (#2781)

tokarchuk/v1.17
Robin Lambertz 8 years ago committed by 无闻
parent 7e9b42c87d
commit 5a9709fa9d
  1. 3
      routers/api/v1/admin/user.go

@ -107,6 +107,9 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) {
if form.AllowImportLocal != nil { if form.AllowImportLocal != nil {
u.AllowImportLocal = *form.AllowImportLocal u.AllowImportLocal = *form.AllowImportLocal
} }
if form.MaxRepoCreation != nil {
u.MaxRepoCreation = *form.MaxRepoCreation
}
if err := models.UpdateUser(u); err != nil { if err := models.UpdateUser(u); err != nil {
if models.IsErrEmailAlreadyUsed(err) { if models.IsErrEmailAlreadyUsed(err) {

Loading…
Cancel
Save