index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
routers
/
api
/
v1
/
admin
/
user.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
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/user.go
parent
7e9b42c87d2276dec2f1789e1296c2ac51533657
(
diff
)
Add MaxRepoCreation to EditUser API (#2781)
Diffstat
(limited to 'routers/api/v1/admin/user.go')
-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 da08862c..bbf06910 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) {