diff --git a/requirements.txt b/requirements.txt index 0eaab6e..4b310c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ Django==1.10.1 git+https://github.com/djangonauts/django-hstore@61427e474cb2f4be8fdfce225d78a5330bc77eb0#egg=django-hstore git+https://github.com/informatic/django-tree@993cec827ed989d3c162698a739da95b9227604b#egg=django-tree django-appconf==1.0.2 -django-auth-ldap==1.2.9 +django-auth-ldap==1.2.12 Django-Select2==5.8.10 djangorestframework==3.5.4 Pillow==3.3.1 diff --git a/spejstore/settings.py b/spejstore/settings.py index 0f1f2c8..93ec4c7 100644 --- a/spejstore/settings.py +++ b/spejstore/settings.py @@ -113,7 +113,7 @@ AUTH_PASSWORD_VALIDATORS = [ # LDAP configuration import ldap -from django_auth_ldap.config import LDAPSearch, GroupOfUniqueNamesType +from django_auth_ldap.config import LDAPSearch, GroupOfUniqueNamesType, LDAPGroupQuery AUTHENTICATION_BACKENDS = ( 'django_auth_ldap.backend.LDAPBackend', @@ -124,10 +124,15 @@ AUTH_LDAP_SERVER_URI = "ldaps://ldap.hackerspace.pl" AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=People,dc=hackerspace,dc=pl" AUTH_LDAP_BIND_AS_AUTHENTICATING_USER = True +member_ldap_query = ( + LDAPGroupQuery("cn=fatty,ou=Group,dc=hackerspace,dc=pl") | + LDAPGroupQuery("cn=starving,ou=Group,dc=hackerspace,dc=pl") | + LDAPGroupQuery("cn=potato,ou=Group,dc=hackerspace,dc=pl")) + AUTH_LDAP_USER_FLAGS_BY_GROUP = { - "is_active": "cn=staff,ou=Group,dc=hackerspace,dc=pl", - "is_superuser": "cn=staff,ou=Group,dc=hackerspace,dc=pl", - "is_staff": "cn=staff,ou=Group,dc=hackerspace,dc=pl", + "is_active": member_ldap_query, + "is_superuser": member_ldap_query, # "cn=staff,ou=Group,dc=hackerspace,dc=pl", + "is_staff": member_ldap_query, } # Populate the Django user from the LDAP directory. diff --git a/static/fonts/glyphicons-halflings-regular.eot b/static/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.eot differ diff --git a/static/fonts/glyphicons-halflings-regular.svg b/static/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/static/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/fonts/glyphicons-halflings-regular.ttf b/static/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.ttf differ diff --git a/static/fonts/glyphicons-halflings-regular.woff b/static/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.woff differ diff --git a/static/fonts/glyphicons-halflings-regular.woff2 b/static/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/static/fonts/glyphicons-halflings-regular.woff2 differ