summaryrefslogtreecommitdiffstats
path: root/routers/admin/auths.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-05-13 23:11:47 +0100
committerGitHub <noreply@github.com>2021-05-13 23:11:47 +0100
commitd234d37aa8377f22882c630036824f7a25e1c2a4 (patch)
treea44005b03e18af05f753b53a497239f824fe863e /routers/admin/auths.go
parent9545c345a89639a673351644e5894adca0f8cfed (diff)
downloadgitea-d234d37aa8377f22882c630036824f7a25e1c2a4.tar.gz
gitea-d234d37aa8377f22882c630036824f7a25e1c2a4.zip
Restore PAM user autocreation functionality (#15825)
* Restore PAM user autocreation functionality PAM autoregistration of users currently fails due to email invalidity. This PR adds a new setting to PAM to allow an email domain to be set or just sets the email to the noreply address and if that fails falls back to uuid@localhost Fix #15702 Signed-off-by: Andrew Thornton <art27@cantab.net> * As per KN4CKER Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/admin/auths.go')
-rw-r--r--routers/admin/auths.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index a0a20fa023..a2f9ab0a5c 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -240,6 +240,7 @@ func NewAuthSourcePost(ctx *context.Context) {
case models.LoginPAM:
config = &models.PAMConfig{
ServiceName: form.PAMServiceName,
+ EmailDomain: form.PAMEmailDomain,
}
case models.LoginOAuth2:
config = parseOAuth2Config(form)
@@ -347,6 +348,7 @@ func EditAuthSourcePost(ctx *context.Context) {
case models.LoginPAM:
config = &models.PAMConfig{
ServiceName: form.PAMServiceName,
+ EmailDomain: form.PAMEmailDomain,
}
case models.LoginOAuth2:
config = parseOAuth2Config(form)