1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/coin_ynh.git synced 2024-09-03 18:16:26 +02:00

Disable ldap stuff that may be causing issue

This commit is contained in:
Alexandre Aubin 2023-12-16 16:35:11 +01:00
parent bcb644d40b
commit 30c4ab94e2

View file

@ -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"
# Tous acces # AUTH_LDAP_USER_SEARCH = LDAPSearch("uid={{ admin }},ou=users,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
# parametrer SSO en protect_uris # AUTH_LDAP_USER_ATTR_MAP = {
# OU # "username": "uid",
# Pas d'acces # "first_name": "givenName",
# hook # "last_name": "sn",
# parametrer SSO en protect_uris # "email": "mail",
import ldap # }
from django_auth_ldap.config import LDAPSearch, PosixGroupType # AUTH_LDAP_USER_FLAGS_BY_GROUP = {
AUTHENTICATION_BACKENDS = ( # "is_active": "cn=sftpusers,ou=groups,dc=yunohost,dc=org",
'django_auth_ldap.backend.LDAPBackend', # "is_staff": "cn=sftpusers,ou=groups,dc=yunohost,dc=org",
'django.contrib.auth.backends.ModelBackend', # "is_superuser": "cn=sftpusers,ou=groups,dc=yunohost,dc=org"
) # }
AUTH_LDAP_SERVER_URI = "ldap://localhost:389" # AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=groups,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(objectClass=posixGroup)")
AUTH_LDAP_USER_SEARCH = LDAPSearch("uid={{ admin }},ou=users,dc=yunohost,dc=org", ldap.SCOPE_SUBTREE, "(uid=%(user)s)") # AUTH_LDAP_GROUP_TYPE = PosixGroupType()
AUTH_LDAP_USER_ATTR_MAP = { # AUTH_LDAP_ALWAYS_UPDATE_USER = True
"username": "uid", # AUTH_LDAP_AUTHORIZE_ALL_USERS = True
"first_name": "givenName", # AUTH_LDAP_FIND_GROUP_PERMS = True
"last_name": "sn", # #AUTH_LDAP_CACHE_GROUPS = True
"email": "mail", # #AUTH_LDAP_GROUP_CACHE_TIMEOUT = 300
} # #import logging
AUTH_LDAP_USER_FLAGS_BY_GROUP = { # #logger = logging.getLogger('django_auth_ldap')
"is_active": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", # #logger.addHandler(logging.StreamHandler())
"is_staff": "cn=sftpusers,ou=groups,dc=yunohost,dc=org", # #logger.setLevel(logging.DEBUG)
"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)