#1511 Allow local import only for admin users
This commit is contained in:
parent
25ec20d525
commit
6f0a41b8b2
18 changed files with 152 additions and 79 deletions
|
@ -213,6 +213,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) {
|
|||
u.IsActive = form.Active
|
||||
u.IsAdmin = form.Admin
|
||||
u.AllowGitHook = form.AllowGitHook
|
||||
u.AllowImportLocal = form.AllowImportLocal
|
||||
|
||||
if err := models.UpdateUser(u); err != nil {
|
||||
if models.IsErrEmailAlreadyUsed(err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue