fix(api): trigger an authorization update after auto-provisioning users (#3428)

This commit is contained in:
Anthony Lapenna
2019-12-04 15:32:55 +13:00
committed by GitHub
parent f6cefb3318
commit 29b7eeef5a
4 changed files with 12 additions and 0 deletions

View File

@@ -113,6 +113,11 @@ func (handler *Handler) authenticateLDAPAndCreateUser(w http.ResponseWriter, use
log.Printf("Warning: unable to automatically add user into teams: %s\n", err.Error())
}
err = handler.AuthorizationService.UpdateUsersAuthorizations()
if err != nil {
return &httperror.HandlerError{http.StatusInternalServerError, "Unable to update user authorizations", err}
}
return handler.writeToken(w, user)
}