Commit 8ca35339 authored by David Seaward's avatar David Seaward Committed by Gogs

Merge branch 'profile_links' of david.seaward/purist_middleware into master

parents 0299715b b9f49270
...@@ -104,6 +104,17 @@ SPDX-License-Identifier: AGPL-3.0 ...@@ -104,6 +104,17 @@ SPDX-License-Identifier: AGPL-3.0
</ul> </ul>
</article> </article>
<nav>
<ul>
{% for name, link in link_profile_dict %}
<li><a href="{{ link }}" class="page">{{ name }}</a>
{% endfor %}
</ul>
</nav>
</main> </main>
<footer> <footer>
......
...@@ -32,6 +32,7 @@ def userlimit(request): ...@@ -32,6 +32,7 @@ def userlimit(request):
"limits": limits, "limits": limits,
"has_limit": has_limit, "has_limit": has_limit,
"link_subscription": settings.LINK_SUBSCRIPTION, "link_subscription": settings.LINK_SUBSCRIPTION,
"link_profile_dict": settings.LINK_PROFILE_DICT,
} }
return render(request, 'limitmonitor/userlimit.html', render_data) return render(request, 'limitmonitor/userlimit.html', render_data)
......
import ldap import ldap
import strictyaml
from decouple import Config, Csv, RepositoryIni from decouple import Config, Csv, RepositoryIni
from django_auth_ldap.config import LDAPSearch from django_auth_ldap.config import LDAPSearch
...@@ -10,10 +11,15 @@ from .settings_original import * ...@@ -10,10 +11,15 @@ from .settings_original import *
CONFIG_PATH = '/etc/opt/purist/middleware/config.ini' CONFIG_PATH = '/etc/opt/purist/middleware/config.ini'
SECRET_PATH = '/etc/opt/purist/middleware/secret.ini' SECRET_PATH = '/etc/opt/purist/middleware/secret.ini'
LINK_PROFILE_PATH = '/etc/opt/purist/middleware/link_profile.strict.yml'
config = Config(RepositoryIni(CONFIG_PATH)) config = Config(RepositoryIni(CONFIG_PATH))
secret_config = Config(RepositoryIni(SECRET_PATH)) secret_config = Config(RepositoryIni(SECRET_PATH))
with open(LINK_PROFILE_PATH, 'r') as stream:
data = strictyaml.load(stream.read()).data
LINK_PROFILE_DICT = sorted(data.items())
# #
# SECURITY # SECURITY
# #
......
...@@ -13,8 +13,10 @@ ordereddict==1.1 ...@@ -13,8 +13,10 @@ ordereddict==1.1
pycparser==2.18 pycparser==2.18
pyldap==2.4.37 pyldap==2.4.37
PyNaCl==1.1.2 PyNaCl==1.1.2
python-dateutil==2.6.1
pytz==2017.2 pytz==2017.2
requests==2.18.4 requests==2.18.4
ruamel.yaml==0.15.34
six==1.11.0 six==1.11.0
urllib3==1.22 urllib3==1.22
vine==1.1.4 vine==1.1.4
...@@ -14,4 +14,5 @@ jinja2-django-tags==0.5 ...@@ -14,4 +14,5 @@ jinja2-django-tags==0.5
paramiko==2.3.1 paramiko==2.3.1
pyasn1==0.3.7 pyasn1==0.3.7
python-decouple==3.1 python-decouple==3.1
strictyaml==0.8.0
WooCommerce==1.2.1 WooCommerce==1.2.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment