fixed flake8 errors
This commit is contained in:
@@ -1062,7 +1062,7 @@ Default:
|
|||||||
|
|
||||||
##### ldap_ignore_attribute_create_modify_timestamp
|
##### ldap_ignore_attribute_create_modify_timestamp
|
||||||
|
|
||||||
_(>= 3.6.0)_
|
_(>= 3.5.1)_
|
||||||
|
|
||||||
Add modifyTimestamp and createTimestamp to the exclusion list of internal ldap3 client
|
Add modifyTimestamp and createTimestamp to the exclusion list of internal ldap3 client
|
||||||
so that these schema attributes are not checked. This is needed for Authentik since
|
so that these schema attributes are not checked. This is needed for Authentik since
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ class Auth(auth.BaseAuth):
|
|||||||
self.ldap = ldap
|
self.ldap = ldap
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
raise RuntimeError("LDAP authentication requires the ldap3 module") from e
|
raise RuntimeError("LDAP authentication requires the ldap3 module") from e
|
||||||
|
|
||||||
self._ldap_ignore_attribute_create_modify_timestamp = configuration.get("auth", "ldap_ignore_attribute_create_modify_timestamp")
|
self._ldap_ignore_attribute_create_modify_timestamp = configuration.get("auth", "ldap_ignore_attribute_create_modify_timestamp")
|
||||||
if self._ldap_ignore_attribute_create_modify_timestamp:
|
if self._ldap_ignore_attribute_create_modify_timestamp:
|
||||||
self.ldap3.utils.config._ATTRIBUTES_EXCLUDED_FROM_CHECK.extend(['createTimestamp','modifyTimestamp'])
|
self.ldap3.utils.config._ATTRIBUTES_EXCLUDED_FROM_CHECK.extend(['createTimestamp', 'modifyTimestamp'])
|
||||||
logger.info("auth.ldap_ignore_attribute_create_modify_timestamp applied")
|
logger.info("auth.ldap_ignore_attribute_create_modify_timestamp applied")
|
||||||
|
|
||||||
self._ldap_uri = configuration.get("auth", "ldap_uri")
|
self._ldap_uri = configuration.get("auth", "ldap_uri")
|
||||||
self._ldap_base = configuration.get("auth", "ldap_base")
|
self._ldap_base = configuration.get("auth", "ldap_base")
|
||||||
|
|||||||
Reference in New Issue
Block a user