Project

General

Profile

Actions

Bug #82510

closed

options.clearCache.all = 0 in user TsConfig also excludes admin users

Added by Christian Müller about 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2017-09-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

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) {

Actions #1

Updated by Christian Müller about 7 years ago

  • Description updated (diff)
Actions #2

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

Actions #4

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.

Actions

Also available in: Atom PDF