Browse Source

Add MaxRepoCreation to EditUser API (#2781)

Robin Lambertz 7 years ago
parent
commit
5a9709fa9d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      routers/api/v1/admin/user.go

+ 3 - 0
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) {