diff options
author | Jimmy Praet <jimmy.praet@telenet.be> | 2022-04-29 21:38:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-29 15:38:11 -0400 |
commit | 5aebc4f000354d9fa448033445c6f313f4c6ab08 (patch) | |
tree | c081c5eff890a454b4c4c3a6aa9d1329eba09052 /routers/web/auth/linkaccount.go | |
parent | 219c87e7d889f5c62097968e5ec8ad04f244cd3c (diff) | |
download | gitea-5aebc4f000354d9fa448033445c6f313f4c6ab08.tar.gz gitea-5aebc4f000354d9fa448033445c6f313f4c6ab08.zip |
Respect DefaultUserIsRestricted system default when creating new user (#19310)
* Apply DefaultUserIsRestricted in CreateUser
* Enforce system defaults in CreateUser
Allow for overwrites with CreateUserOverwriteOptions
* Fix compilation errors
* Add "restricted" option to create user command
* Add "restricted" option to create user admin api
* Respect default setting.Service.RegisterEmailConfirm and setting.Service.RegisterManualConfirm where needed
* Revert "Respect default setting.Service.RegisterEmailConfirm and setting.Service.RegisterManualConfirm where needed"
This reverts commit ee95d3e8dc9e9fff4fa66a5111e4d3930280e033.
Diffstat (limited to 'routers/web/auth/linkaccount.go')
-rw-r--r-- | routers/web/auth/linkaccount.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/auth/linkaccount.go b/routers/web/auth/linkaccount.go index bf5fb83265..c3e96f077a 100644 --- a/routers/web/auth/linkaccount.go +++ b/routers/web/auth/linkaccount.go @@ -283,13 +283,12 @@ func LinkAccountPostRegister(ctx *context.Context) { Name: form.UserName, Email: form.Email, Passwd: form.Password, - IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm), LoginType: auth.OAuth2, LoginSource: authSource.ID, LoginName: gothUser.UserID, } - if !createAndHandleCreatedUser(ctx, tplLinkAccount, form, u, &gothUser, false) { + if !createAndHandleCreatedUser(ctx, tplLinkAccount, form, u, nil, &gothUser, false) { // error already handled return } |