euscanwww: Added LDAP login

Needs testing and the settings must be changed to use the gentoo ldap
server

Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
volpino 2012-06-12 13:39:05 +02:00
parent bd9af90ff6
commit 7367596e33
2 changed files with 17 additions and 5 deletions

View File

@ -202,14 +202,16 @@ LOGGING = {
} }
} }
# django-registration
ACCOUNT_ACTIVATION_DAYS = 7 ACCOUNT_ACTIVATION_DAYS = 7
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# djeuscan tasks
PORTAGE_ROOT = "/usr/portage/" PORTAGE_ROOT = "/usr/portage/"
PORTAGE_CONFIGROOT = PORTAGE_ROOT PORTAGE_CONFIGROOT = PORTAGE_ROOT
LAYMAN_CONFIG = "/etc/layman/layman.cfg" LAYMAN_CONFIG = "/etc/layman/layman.cfg"
EMERGE_REGEN_JOBS = 4 EMERGE_REGEN_JOBS = 4
# Celery config # Celery config
import djcelery import djcelery
djcelery.setup_loader() djcelery.setup_loader()
@ -218,6 +220,14 @@ CELERY_RESULT_BACKEND = "amqp"
BROKER_CONNECTION_TIMEOUT = 3600 BROKER_CONNECTION_TIMEOUT = 3600
CELERYD_CONCURRENCY = 4 CELERYD_CONCURRENCY = 4
# LDAP authentication
# TODO: Test data - change me!
AUTH_LDAP_SERVER_URI = "ldap://localhost"
AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=users,dc=my-domain,dc=com"
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
)
try: try:
from local_settings import * from local_settings import *

View File

@ -87,10 +87,12 @@ setup(
'https://github.com/iksaif/euscan/tarball/' + 'https://github.com/iksaif/euscan/tarball/' +
('master' if __version__ == '9999' else ('euscan-%s' % __version__)) ('master' if __version__ == '9999' else ('euscan-%s' % __version__))
), ),
install_requires=['Django==1.4', 'django-annoying==0..7.6', 'South==0.7.4', install_requires=[
'django-piston==0.2.3', 'BeautifulSoup==3.2.1', 'Django==1.4', 'django-annoying==0.7.6', 'South==0.7.4',
'matplotlib==1.1.0', 'django-celery==2.5.5', 'django-piston==0.2.3', 'BeautifulSoup==3.2.1', 'matplotlib==1.1.0',
'django-registration==0.8'], 'django-celery==2.5.5', 'django-registration==0.8',
'python-ldap==2.4.10', 'django-auth-ldap==1.1',
],
package_dir={'': 'pym'}, package_dir={'': 'pym'},
packages=packages, packages=packages,
package_data={}, package_data={},