Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AUTH_LDAP_USER_FLAGS_BY_GROUP = {
- "is_active": "cn=active,ou=groups,dc=example,dc=com",
- "is_staff": "cn=staff,ou=groups,dc=example,dc=com",
- "is_superuser": "cn=superuser,ou=groups,dc=example,dc=com"
- }
- # Load environmental variables here
- hostname = os.environ['AUTH_LDAP_SERVER']
- binduser = os.environ['AUTH_LDAP_BIND_USER']
- bindgroup = os.environ['AUTH_LDAP_BIND_GROUP']
- dc1 = os.environ['AUTH_LDAP_BIND_DC1']
- dc2 = os.environ['AUTH_LDAP_BIND_DC2']
- bindpassword = os.environ['AUTH_LDAP_PASSWORD']
- AUTH_LDAP_USER_FLAGS_BY_GROUP = {
- "is_active": "cn=active,{bindgroup},dc={dc1),dc={dc2}",
- "is_staff": "cn=staff,{bindgroup},dc={dc1},dc={dc2}",
- "is_superuser": "cn=administrators,{bindgroup},dc={dc1},dc={dc2}"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement