mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
Change banners on home page if no permissions
(except view activity, natch) > No permissions – Remove trial mode banner > No permissions – Add blue banner saying 'You only have permission to view this service'
This commit is contained in:
@@ -8,10 +8,14 @@
|
||||
|
||||
{% if not templates and current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], any_=True) %}
|
||||
{% include 'views/dashboard/get-started.html' %}
|
||||
{% elif current_service.restricted %}
|
||||
<div class="dashboard">
|
||||
{% elif current_user.has_permissions([
|
||||
'manage_templates', 'manage_api_keys', 'manage_users', 'manage_settings
|
||||
'], any_=True, admin_override=True) %}
|
||||
{% if current_service.restricted %}
|
||||
{% include 'views/dashboard/trial-mode-banner.html' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include 'views/dashboard/no-permissions-banner.html' %}
|
||||
{% endif %}
|
||||
|
||||
<div
|
||||
|
||||
5
app/templates/views/dashboard/no-permissions-banner.html
Normal file
5
app/templates/views/dashboard/no-permissions-banner.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% call banner_wrapper(type="mode") %}
|
||||
You only have permission to view this service
|
||||
{% endcall %}
|
||||
Reference in New Issue
Block a user