Bug #82510
closedoptions.clearCache.all = 0 in user TsConfig also excludes admin users
0%
Description
As the documentation says:
options.clearCache.all
This will allow a non-admin user to clear frontend and page-related caches, plus some backend-related caches (that is everything including templates).
With this option set to 0 (zero), which is the default value, an admin user should be able to "Flush all caches". But that's not the case.
Settings it to 1 allows admin and non-admin users to "Flush all caches".
/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php:66
if ($backendUser->getTSConfigVal('options.clearCache.all') || ($backendUser->isAdmin() && $backendUser->getTSConfigVal('options.clearCache.all') !== '0')) {
Should be
if ($backendUser->getTSConfigVal('options.clearCache.all') || $backendUser->isAdmin()) {
/typo3/sysext/core/Classes/DataHandling/DataHandler.php:8539
if ($this->BE_USER->getTSConfigVal('options.clearCache.all') || ($this->admin && $this->BE_USER->getTSConfigVal('options.clearCache.all') !== '0')) {
Should be
if ($this->BE_USER->getTSConfigVal('options.clearCache.all') || $this->admin) {
Updated by Guido Schmechel over 6 years ago
I think the doc is outdated.
Code doc:
// Clearing of all caches is only shown if explicitly enabled via TSConfig
// or if BE-User is admin and the TSconfig explicitly disables the possibility for admins.
// This is useful for big production systems where admins accidentally could slow down the system.
Related: https://forge.typo3.org/issues/75844 & https://github.com/TYPO3/TYPO3.CMS/commit/211c3a7b529cc935bd264c33c1e2ed95ecc64012
Updated by Riccardo De Contardi over 6 years ago
I created a pr for the docs https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TSconfig/pull/74
Updated by Riccardo De Contardi about 6 years ago
- Status changed from New to Closed
I close this issue, as the documentation about the effect of options.clearCache.all=0
on an admin user are now documented.
If you think that this is the wrong decision or that I have misunderstood or that there is still work to do about this topic, please reopen it or ping me
Thank you.