From 9b00cd85c77230c770cc0b2db12ba2562df4b3e7 Mon Sep 17 00:00:00 2001 From: Pawel Boguslawski Date: Mon, 13 Jun 2022 09:36:48 +0200 Subject: [PATCH] Access to Latest Page Updates for users with admin.pages.list privilege This mod allows users with admin.pages.list provilege to see Latest Page Updates on Dashboard (user can see page list so there is no point in disallowig them to see list of recently updated pages). It also removes unnecessarry and misleading message about dashboard access denied instead of Latest Page Updates area (user still may have access to stats on Dasboard for example; printing such messages should be avoided for cleaner UI). Author-Change-Id: IB#1120576 --- themes/grav/templates/partials/dashboard-pages.html.twig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/themes/grav/templates/partials/dashboard-pages.html.twig b/themes/grav/templates/partials/dashboard-pages.html.twig index 7f3b4927..501e2119 100644 --- a/themes/grav/templates/partials/dashboard-pages.html.twig +++ b/themes/grav/templates/partials/dashboard-pages.html.twig @@ -1,4 +1,4 @@ -{% if authorize(['admin.pages', 'admin.super']) %} +{% if authorize(['admin.pages.list', 'admin.pages', 'admin.super']) %}
{{ "PLUGIN_ADMIN.MANAGE_PAGES"|t }} @@ -15,6 +15,4 @@ {% endfor %}
-{% else %} -
You don't have sufficient access to view the dashboard...
{% endif %}