mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-29 10:10:19 +00:00
frontpage: Show config options only to admins
This commit is contained in:
parent
b0321d7d29
commit
0f3189c6bd
@ -76,7 +76,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
<br>
|
<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"
|
<a class="btn btn-primary btn-sm"
|
||||||
style="margin-left : 10px; margin-bottom : 5px"
|
style="margin-left : 10px; margin-bottom : 5px"
|
||||||
href="{{ configure_url }}">
|
href="{{ configure_url }}">
|
||||||
|
|||||||
@ -50,7 +50,8 @@ def index(request):
|
|||||||
'selected_id': selection,
|
'selected_id': selection,
|
||||||
'details': details,
|
'details': details,
|
||||||
'details_label': details_label,
|
'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):
|
class ServiceView(FormView):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user