Skip to content

redomino/lfs_ldap_buildout

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

If you want to install Django LFS [http://www.getlfs.com/] with ldap support, you can fork this repository.

How to use it?

  • git clone [email protected]:redomino/lfs_ldap_buildout.git
  • cd lfs_ldap_buildout
  • virtualenv --no-site-packages .
  • bin/python bootstrap.py
  • bin/buildout -v
  • Enter your database settings to lfs_project/settings.py
  • bin/django syncdb
  • bin/django lfs_init
  • bin/django collectstatic
  • bin/django runserver

In lfs_project/settings.py comment or delete the default backend configuration and add the following code:

LDAP BACKEND SETTINGS

import ldap
from django_auth_ldap.config import LDAPSearch

INSERT YOUR LDAP SERVER URI 

AUTH_LDAP_SERVER_URI = "ldap://ldap.example.com"
AUTH_LDAP_BIND_DN = ""
AUTH_LDAP_BIND_PASSWORD = ""
AUTH_LDAP_USER_SEARCH = LDAPSearch("dc=example,dc=com",
            ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
AUTHENTICATION_BACKENDS = (
            'django_auth_ldap.backend.LDAPBackend',
            'django.contrib.auth.backends.ModelBackend',
            )
            
ATTRIBUTE MAPPING EXAMPLE

AUTH_LDAP_USER_ATTR_MAP = {"username": "USERNAME", "last_name": "SN", "first_name": "FN", "email": "E-MAIL"}

Browse to http://localhost:8000

More Information

Credits

Many thanks to Filippo Projetto

About

django lfs with ldap support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%