summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-01-20 19:18:23 +0000
committerLauris BH <lauris@nix.lv>2020-01-20 21:18:23 +0200
commitff508c9c9b7405dc82b760ed9e44e35757c1e768 (patch)
tree4547f3ad3c577679e57428c595c630c25f84fc18 /modules
parentf96c1a2c79a86a157f5eb697a5f1ac89ee33267f (diff)
downloadgitea-ff508c9c9b7405dc82b760ed9e44e35757c1e768.tar.gz
gitea-ff508c9c9b7405dc82b760ed9e44e35757c1e768.zip
Add option to prevent LDAP from deactivating everything on empty search (#9879) (#9896)
* Add option to prevent LDAP from deactivating everything on empty search * Update options/locale/locale_en-US.ini Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/auth/auth_form.go1
-rw-r--r--modules/auth/ldap/ldap.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/modules/auth/auth_form.go b/modules/auth/auth_form.go
index c838590c1f..a30ebb75eb 100644
--- a/modules/auth/auth_form.go
+++ b/modules/auth/auth_form.go
@@ -30,6 +30,7 @@ type AuthenticationForm struct {
SearchPageSize int
Filter string
AdminFilter string
+ AllowDeactivateAll bool
IsActive bool
IsSyncEnabled bool
SMTPAuth string
diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go
index ed83a77e12..7f0d2c93f3 100644
--- a/modules/auth/ldap/ldap.go
+++ b/modules/auth/ldap/ldap.go
@@ -47,6 +47,7 @@ type Source struct {
Filter string // Query filter to validate entry
AdminFilter string // Query filter to check if user is admin
Enabled bool // if this source is disabled
+ AllowDeactivateAll bool // Allow an empty search response to deactivate all users from this source
}
// SearchResult : user data