Issue Bug Closed

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

Christian Müller 09/19/17, 15:32 updated 10/13/18, 21:48

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

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.