Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. AUTH_LDAP_USER_FLAGS_BY_GROUP = {
  2. "is_active": "cn=active,ou=groups,dc=example,dc=com",
  3. "is_staff": "cn=staff,ou=groups,dc=example,dc=com",
  4. "is_superuser": "cn=superuser,ou=groups,dc=example,dc=com"
  5. }
  6.  
  7. # Load environmental variables here
  8. hostname = os.environ['AUTH_LDAP_SERVER']
  9. binduser = os.environ['AUTH_LDAP_BIND_USER']
  10. bindgroup = os.environ['AUTH_LDAP_BIND_GROUP']
  11. dc1 = os.environ['AUTH_LDAP_BIND_DC1']
  12. dc2 = os.environ['AUTH_LDAP_BIND_DC2']
  13. bindpassword = os.environ['AUTH_LDAP_PASSWORD']
  14.  
  15. AUTH_LDAP_USER_FLAGS_BY_GROUP = {
  16. "is_active": "cn=active,{bindgroup},dc={dc1),dc={dc2}",
  17. "is_staff": "cn=staff,{bindgroup},dc={dc1},dc={dc2}",
  18. "is_superuser": "cn=administrators,{bindgroup},dc={dc1},dc={dc2}"
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement