mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-10 18:40:53 +00:00
Use a simple getattr to get the LDAP scope
This commit is contained in:
parent
5d55b2868f
commit
74c16e6402
1 changed files with 1 additions and 6 deletions
|
@ -34,12 +34,7 @@ ATTRIBUTE = config.get("acl", "ldap_attribute")
|
|||
CONNEXION = ldap.initialize(config.get("acl", "ldap_url"))
|
||||
BINDDN = config.get("acl", "ldap_binddn")
|
||||
PASSWORD = config.get("acl", "ldap_password")
|
||||
|
||||
SCOPE = ldap.SCOPE_ONELEVEL
|
||||
if config.get("acl", "ldap_scope").lower() == 'subtree':
|
||||
SCOPE = ldap.SCOPE_SUBTREE
|
||||
elif config.get("acl", "ldap_scope").lower() == 'base':
|
||||
SCOPE = ldap.SCOPE_BASE
|
||||
SCOPE = getattr(ldap, "SCOPE_%s" % config.get("acl", "ldap_scope").upper())
|
||||
|
||||
|
||||
def has_right(owner, user, password):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue