summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2018-10-27 10:20:02 +0200
committerAlexander Sulfrian <asulfrian@zedat.fu-berlin.de>2020-01-07 18:41:37 +0100
commit9db4666a657bf137b371b9163a60e9c818ea31f3 (patch)
treed9dd69aea7e9443b46387aae5bfb4efbd41a65c2 /app
parent937b6480d534b3051cadf4a892a9aa210bec579a (diff)
downloadchat-9db4666a657bf137b371b9163a60e9c818ea31f3.tar.gz
chat-9db4666a657bf137b371b9163a60e9c818ea31f3.tar.bz2
chat-9db4666a657bf137b371b9163a60e9c818ea31f3.zip
ldap: Add own ldap authenticationspline
Diffstat (limited to 'app')
-rw-r--r--app/authentication.go3
-rw-r--r--app/ldap.go5
-rw-r--r--app/license.go5
3 files changed, 4 insertions, 9 deletions
diff --git a/app/authentication.go b/app/authentication.go
index 566eac804..ef200ed2b 100644
--- a/app/authentication.go
+++ b/app/authentication.go
@@ -181,8 +181,7 @@ func checkUserNotDisabled(user *model.User) *model.AppError {
}
func (a *App) authenticateUser(user *model.User, password, mfaToken string) (*model.User, *model.AppError) {
- license := a.License()
- ldapAvailable := *a.Config().LdapSettings.Enable && a.Ldap != nil && license != nil && *license.Features.LDAP
+ ldapAvailable := *a.Config().LdapSettings.Enable && a.Ldap != nil
if user.AuthService == model.USER_AUTH_SERVICE_LDAP {
if !ldapAvailable {
diff --git a/app/ldap.go b/app/ldap.go
index 544905b70..a73760263 100644
--- a/app/ldap.go
+++ b/app/ldap.go
@@ -15,7 +15,7 @@ import (
func (a *App) SyncLdap() {
a.Go(func() {
- if license := a.License(); license != nil && *license.Features.LDAP && *a.Config().LdapSettings.EnableSync {
+ if *a.Config().LdapSettings.EnableSync {
if ldapI := a.Ldap; ldapI != nil {
ldapI.StartSynchronizeJob(false)
} else {
@@ -26,8 +26,7 @@ func (a *App) SyncLdap() {
}
func (a *App) TestLdap() *model.AppError {
- license := a.License()
- if ldapI := a.Ldap; ldapI != nil && license != nil && *license.Features.LDAP && (*a.Config().LdapSettings.Enable || *a.Config().LdapSettings.EnableSync) {
+ if ldapI := a.Ldap; ldapI != nil && (*a.Config().LdapSettings.Enable || *a.Config().LdapSettings.EnableSync) {
if err := ldapI.RunTest(); err != nil {
err.StatusCode = 500
return err
diff --git a/app/license.go b/app/license.go
index ec18ec318..d59fd0107 100644
--- a/app/license.go
+++ b/app/license.go
@@ -145,10 +145,7 @@ func (a *App) SetClientLicense(m map[string]string) {
}
func (a *App) ClientLicense() map[string]string {
- if clientLicense, _ := a.clientLicenseValue.Load().(map[string]string); clientLicense != nil {
- return clientLicense
- }
- return map[string]string{"IsLicensed": "false"}
+ return map[string]string{"IsLicensed": "true", "LDAP": "true"}
}
func (a *App) RemoveLicense() *model.AppError {