mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-18 08:33:41 +00:00
frontpage: Show config options only to admins
This commit is contained in:
parent
b0321d7d29
commit
0f3189c6bd
@ -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 }}">
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user