Skip to content

Commit

Permalink
Move ldpa settings to local_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
retspen committed Apr 16, 2014
1 parent 09b632f commit 3b5223c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 39 deletions.
15 changes: 9 additions & 6 deletions webvirtmgr/local/local_settings.py.example
Expand Up @@ -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,
Expand Down
33 changes: 0 additions & 33 deletions webvirtmgr/settings.py
Expand Up @@ -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 = "<ldapbindpassword>"
#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',
Expand Down

0 comments on commit 3b5223c

Please sign in to comment.