diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e6841a1..fe4d5a07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v1.10.11 +## mm/dd/2021 + +1. [](#bugfix) + * Fixed `You have been logged out` message when entering to 2FA authentication due to `/admin/task:getNotifications` AJAX call [#2109](https://github.com/getgrav/grav-plugin-admin/issues/2109) + # v1.10.10 ## 04/07/2021 diff --git a/themes/grav/templates/partials/javascript-config.html.twig b/themes/grav/templates/partials/javascript-config.html.twig index 6290dcdf..6e75b3db 100644 --- a/themes/grav/templates/partials/javascript-config.html.twig +++ b/themes/grav/templates/partials/javascript-config.html.twig @@ -1,4 +1,4 @@ -{% if authorize(['admin.login', 'admin.super']) %} +{% if user.authorized and authorize(['admin.login', 'admin.super']) %} {% set notifications = (config.plugins.admin.widgets['dashboard-notifications'] or config.plugins.admin.notifications.dashboard or config.plugins.admin.notifications.plugins or config.plugins.admin.notifications.themes) ? 1 : 0 %} {% switch template_route %} {% case 'dashboard' %}