mirror of
https://github.com/documize/community.git
synced 2025-08-04 21:15:24 +02:00
PRovide LDAP sync and authentication
This commit is contained in:
parent
63b17f9b88
commit
074eea3aeb
38 changed files with 567 additions and 499 deletions
|
@ -130,7 +130,7 @@ func (h *Handler) Sync(w http.ResponseWriter, r *http.Request) {
|
|||
if len(u.Email) == 0 {
|
||||
missing++
|
||||
} else {
|
||||
err = addUser(ctx, h.Runtime, h.Store, u, c.DefaultPermissionAddSpace)
|
||||
_, err = auth.AddExternalUser(ctx, h.Runtime, h.Store, u, c.DefaultPermissionAddSpace)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request) {
|
|||
u.Salt = secrets.GenerateSalt()
|
||||
u.Password = secrets.GeneratePassword(secrets.GenerateRandomPassword(), u.Salt)
|
||||
|
||||
err = addUser(ctx, h.Runtime, h.Store, u, ac.DefaultPermissionAddSpace)
|
||||
u, err = auth.AddExternalUser(ctx, h.Runtime, h.Store, u, ac.DefaultPermissionAddSpace)
|
||||
if err != nil {
|
||||
response.WriteServerError(w, method, err)
|
||||
h.Runtime.Log.Error(method, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue