diff --git a/webvirtmgr/local/local_settings.py.example b/webvirtmgr/local/local_settings.py.example index c9a92703..117ceee6 100644 --- a/webvirtmgr/local/local_settings.py.example +++ b/webvirtmgr/local/local_settings.py.example @@ -18,18 +18,21 @@ LOCAL_PATH = os.path.dirname(os.path.abspath(__file__)) from webvirtmgr.utils import secret_key SECRET_KEY = secret_key.generate_or_read_from_file(os.path.join(LOCAL_PATH, '.secret_key_store')) -# Authentication Backends -AUTHENTICATION_BACKENDS = ( -# 'django_auth_ldap.backend.LDAPBackend', - 'django.contrib.auth.backends.ModelBackend', -) - ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS +# Uncomment the relevant entries for ldap authentication +# import ldap +# from django_auth_ldap.config import LDAPSearch,GroupOfUniqueNamesType + +#AUTHENTICATION_BACKENDS = ( +# 'django_auth_ldap.backend.LDAPBackend', +# 'django.contrib.auth.backends.ModelBackend', +#) + # If the system is unable to verify the directory cert then change these settings #AUTH_LDAP_GLOBAL_OPTIONS = { # ldap.OPT_X_TLS_REQUIRE_CERT: True, diff --git a/webvirtmgr/settings.py b/webvirtmgr/settings.py index 552234ea..4279df46 100644 --- a/webvirtmgr/settings.py +++ b/webvirtmgr/settings.py @@ -6,45 +6,12 @@ DEBUG = False TEMPLATE_DEBUG = DEBUG -AUTHENTICATION_BACKENDS = ( -# 'django_auth_ldap.backend.LDAPBackend', - 'django.contrib.auth.backends.ModelBackend', -) - ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS -# Uncomment the relevant entries for ldap authentication -# import ldap -# from django_auth_ldap.config import LDAPSearch,GroupOfUniqueNamesType - -# If the system is unable to verify the directory cert then change these settings -#AUTH_LDAP_GLOBAL_OPTIONS = { -# ldap.OPT_X_TLS_REQUIRE_CERT: True, -# ldap.OPT_X_TLS_DEMAND: True, -# ldap.OPT_REFERRALS: False, -# ldap.OPT_X_TLS_CACERTDIR: "/etc/pki/tls/certs/", -#} - -#AUTH_LDAP_SERVER_URI = "ldaps://ldapserverhostname.example.com" -#AUTH_LDAP_BIND_DN = "uid=binduser,ou=systemusers,dc=example,dc=com" -#AUTH_LDAP_BIND_PASSWORD = "" -#AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com", -# ldap.SCOPE_SUBTREE, "(uid=%(user)s)") -#AUTH_LDAP_GROUP_SEARCH = LDAPSearch("ou=groups,dc=example,dc=com", -# ldap.SCOPE_SUBTREE, "(objectClass=groupOfUniqueNames)" -#) -#AUTH_LDAP_GROUP_TYPE = GroupOfUniqueNamesType() -# -#AUTH_LDAP_USER_FLAGS_BY_GROUP = { -# "is_active": ["cn=grouptopermit1,ou=groups,dc=example,dc=com", "cn=grouptopermit2,ou=groups,dc=example,dc=com"], -# "is_staff": "cn=grouptopermit2,ou=groups,dc=example,dc=com", -# "is_superuser": "cn=grouptopermit2,ou=groups,dc=example,dc=com" -#} - DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3',