frontpage: Show config options only to admins

This commit is contained in:
lispyclouds authored and Sunil Mohan Adapa committed 2017-02-15 21:06:20 +05:30
1 parent b0321d7d29
commit 0f3189c6bd
2 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@
{% endfor %}
<br>
{% if user.is_authenticated and configure_url %}
{% if user.is_authenticated and user_is_admin and configure_url %}
<a class="btn btn-primary btn-sm"
style="margin-left : 10px; margin-bottom : 5px"
href="{{ configure_url }}">
+2 -1
View File
@@ -50,7 +50,8 @@ def index(request):
'selected_id': selection,
'details': details,
'details_label': details_label,
'configure_url': configure_url })
'configure_url': configure_url,
'user_is_admin': request.user.groups.filter(name='admin').exists()})
class ServiceView(FormView):