From 30c4ab94e27953ec4dbc304aeb74373fc3ec834f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 16 Dec 2023 16:35:11 +0100 Subject: [PATCH] Disable ldap stuff that may be causing issue --- conf/local.py.j2 | 95 +++++++++++++++++++++--------------------------- 1 file changed, 41 insertions(+), 54 deletions(-) diff --git a/conf/local.py.j2 b/conf/local.py.j2 index d42a4be..692eacc 100644 --- a/conf/local.py.j2 +++ b/conf/local.py.j2 @@ -37,57 +37,44 @@ FEEDS = (('ffdn', 'http://www.ffdn.org/fr/rss.xml', 3),) - - - - - - - - - - - - - - - - - - -# Tous acces -# parametrer SSO en protect_uris -# OU -# Pas d'acces -# hook -# parametrer SSO en protect_uris -import ldap -from django_auth_ldap.config import LDAPSearch, PosixGroupType -AUTHENTICATION_BACKENDS = ( - 'django_auth_ldap.backend.LDAPBackend', - 'django.contrib.auth.backends.ModelBackend', -) -AUTH_LDAP_SERVER_URI = "ldap://localhost:389" -AUTH_LDAP_USER_SEARCH = LDAPSearch("uid={{ admin }},ou=users,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(uid=%(user)s)") -AUTH_LDAP_USER_ATTR_MAP = { - "username": "uid", - "first_name": "givenName", - "last_name": "sn", - "email": "mail", -} -AUTH_LDAP_USER_FLAGS_BY_GROUP = { - "is_active": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", - "is_staff": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", - "is_superuser": "cn=sftpusers,ou=groups,dc=yunohost,dc=org" -} -AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=groups,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(objectClass=posixGroup)") -AUTH_LDAP_GROUP_TYPE = PosixGroupType() -AUTH_LDAP_ALWAYS_UPDATE_USER = True -AUTH_LDAP_AUTHORIZE_ALL_USERS = True -AUTH_LDAP_FIND_GROUP_PERMS = True -#AUTH_LDAP_CACHE_GROUPS = True -#AUTH_LDAP_GROUP_CACHE_TIMEOUT = 300 -#import logging -#logger = logging.getLogger('django_auth_ldap') -#logger.addHandler(logging.StreamHandler()) -#logger.setLevel(logging.DEBUG) +# +# +# +# +# +# # Tous acces +# # parametrer SSO en protect_uris +# # OU +# # Pas d'acces +# # hook +# # parametrer SSO en protect_uris +# import ldap +# from django_auth_ldap.config import LDAPSearch, PosixGroupType +# AUTHENTICATION_BACKENDS = ( +# 'django_auth_ldap.backend.LDAPBackend', +# 'django.contrib.auth.backends.ModelBackend', +# ) +# AUTH_LDAP_SERVER_URI = "ldap://localhost:389" +# AUTH_LDAP_USER_SEARCH = LDAPSearch("uid={{ admin }},ou=users,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(uid=%(user)s)") +# AUTH_LDAP_USER_ATTR_MAP = { +# "username": "uid", +# "first_name": "givenName", +# "last_name": "sn", +# "email": "mail", +# } +# AUTH_LDAP_USER_FLAGS_BY_GROUP = { +# "is_active": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", +# "is_staff": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", +# "is_superuser": "cn=sftpusers,ou=groups,dc=yunohost,dc=org" +# } +# AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=groups,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(objectClass=posixGroup)") +# AUTH_LDAP_GROUP_TYPE = PosixGroupType() +# AUTH_LDAP_ALWAYS_UPDATE_USER = True +# AUTH_LDAP_AUTHORIZE_ALL_USERS = True +# AUTH_LDAP_FIND_GROUP_PERMS = True +# #AUTH_LDAP_CACHE_GROUPS = True +# #AUTH_LDAP_GROUP_CACHE_TIMEOUT = 300 +# #import logging +# #logger = logging.getLogger('django_auth_ldap') +# #logger.addHandler(logging.StreamHandler()) +# #logger.setLevel(logging.DEBUG)