From 7d0690b5e8ef97dc52e44a554b00dc2941e88702 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 4 May 2023 15:54:02 +0200 Subject: [PATCH] Unify the cache management permissions to `admin.management.canRebuildData` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Previously CacheListPage and CacheClearAction used differing permissions, which is not useful at all. Especially since the template didn't check the differing permissions. Unify them to “can rebuild data”, because it's the most related one, clearing the cache effectively rebuilds some data. --- com.woltlab.wcf/acpMenu.xml | 2 +- .../install/files/lib/acp/action/CacheClearAction.class.php | 2 +- wcfsetup/install/files/lib/acp/page/CacheListPage.class.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/com.woltlab.wcf/acpMenu.xml b/com.woltlab.wcf/acpMenu.xml index 1b87f4feed..5f839deffe 100644 --- a/com.woltlab.wcf/acpMenu.xml +++ b/com.woltlab.wcf/acpMenu.xml @@ -715,7 +715,7 @@ wcf\acp\page\CacheListPage wcf.acp.menu.link.maintenance - admin.configuration.canManageApplication + admin.management.canRebuildData wcf\acp\page\RebuildDataPage diff --git a/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php b/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php index 4d0ac2b62c..1ec9ed8a0b 100644 --- a/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php @@ -21,7 +21,7 @@ final class CacheClearAction extends AbstractSecureAction /** * @inheritDoc */ - public $neededPermissions = ['admin.management.canViewLog']; + public $neededPermissions = ['admin.management.canRebuildData']; /** * @inheritDoc diff --git a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php index 4dada7d01e..dfb9470801 100755 --- a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php @@ -27,7 +27,7 @@ class CacheListPage extends AbstractPage /** * @inheritDoc */ - public $neededPermissions = ['admin.configuration.canManageApplication']; + public $neededPermissions = ['admin.management.canRebuildData']; /** * indicates if cache was cleared -- 2.20.1