Commit Graph

16 Commits (acfc942ad7e12674ca85ebe9a5af9e3a77051d19)

Author SHA1 Message Date
Unknwon 978dc00305 APIs: admin users
Adam Strzelecki 573305f3d3 LDAP: Optional user name attribute specification
Consider following LDAP search query example:

    (&(objectClass=Person)(|(uid=%s)(mail=%s)))

Right now on first login attempt Gogs will use the text supplied on login form
as the newly created user name. In example query above the text matches against
both e-mail or user name. So if user puts the e-mail then the new Gogs user
name will be e-mail which may be undesired.

Using optional user name attribute setting we can explicitly say we want Gogs
user name to be certain LDAP attribute eg. `uid`, so even user will use e-mail
to login 1st time, the new account will receive correct user name.
Unknwon 932dbccb67 fix import path, fix
Unknwon cd37fccdfb remove auto_register and makes it default
Unknwon 362d64df04 add allowed domains for SMTP auth
Unknwon 121a81a2c5 finish new edit auth UI
Unknwon 0617448282 finish new add auth UI
Sergio Benitez 2d1db4bf05 Added LDAP simple auth support.
Unknwon ea454c21f7 A way to skip TLS verify for SMTP authentication
Girish Ramakrishnan 24d7a86a8d 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.
Sergio Benitez 7d84d4a8f0 Significantly enhanced LDAP support in Gogs.
Paolo Borelli 182003aa41 Add PAM authentication
Unknwon 211596f407 LDAP add and edit form are misleading
Lauris BH 00653e52ee Get username, name, surname and e-mail from LDAP server
Unknwon fa241efa6d Use binding middleware
Unknwon 8dd07c0ddd New UI merge in progress