diff options
author | Girish Ramakrishnan <girish@cloudron.io> | 2015-08-18 21:34:03 -0700 |
---|---|---|
committer | Girish Ramakrishnan <girish@cloudron.io> | 2015-08-18 23:49:12 -0700 |
commit | 24d7a86a8d35aa1fadf05deaa10e141d33ea6632 (patch) | |
tree | 81f20ad9fa63e815ae0accf59a39eca2252b6068 /modules/auth/auth_form.go | |
parent | 03b85b73af03eae98308fc3d36cdbd47db1503d6 (diff) | |
download | gitea-24d7a86a8d35aa1fadf05deaa10e141d33ea6632.tar.gz gitea-24d7a86a8d35aa1fadf05deaa10e141d33ea6632.zip |
Set IsAdmin using LDAP
The IsAdmin flag is set based on whether the admin filter
returned any result. The admin filter is applied with the user dn
as the search root.
In the future, we should update IsAdmin as well on each login.
Alternately, we can have a periodic sync operation.
Diffstat (limited to 'modules/auth/auth_form.go')
-rw-r--r-- | modules/auth/auth_form.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/auth/auth_form.go b/modules/auth/auth_form.go index 94753b3edd..bfae4b13c4 100644 --- a/modules/auth/auth_form.go +++ b/modules/auth/auth_form.go @@ -23,6 +23,7 @@ type AuthenticationForm struct { AttributeSurname string AttributeMail string Filter string + AdminFilter string IsActived bool SMTPAuth string `form:"smtp_auth"` SMTPHost string `form:"smtp_host"` |