Project

General

Profile

Actions

Bug #89939

closed

Enabling/disabling backend users via context menu has no effect

Added by Dmitry Dulepov almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2019-12-13
Due date:
% Done:

100%

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

Description

It is not possible to enable or disable a TYPO3 Backend user via context menu.

Technical analysis

Context menu sends the following command to disable backend user: /typo3/index.php?route=%2Frecord%2Fcommit&token=xxx&data[be_users][2][hidden]=1&prErr=1&redirect=%2Ftypo3%2Findex.php%3FM%3Dsystem_BeuserTxBeuser%26moduleToken%3Dyyy

The problem here is data[be_users][2][hidden] part, which is constructed in ContextMenuActions.disableRecord function of EXT:backend/Resources/Public/JavaScript/ContextMenuActions.js

Unlike all other tables, be_users table uses disable field instead of hidden. Thus the call from context menu has no effect.

Interestingly the enable/disable button on the right of the user module send the following command: /typo3/index.php?route=%2Frecord%2Fcommit&token=xxx&prErr=1&uPT=1&redirect=%2Ftypo3%2Findex.php%3FM%3Dsystem_BeuserTxBeuser%26moduleToken%3Dyyy&data%5Bbe_users%5D%5B2%5D%5Bdisable%5D=1

In the List module the enable/disable button sends http://easyweb.ddev.site/typo3/index.php?ajaxID=%2Fajax%2Frecord%2Fprocess&ajaxToken=xxx&data[be_users][2][disable]=0

Actions #1

Updated by Oliver Bartsch almost 5 years ago

Hi,

this only affects 8.7 or should this also be check on 9.5 and master?

Actions #2

Updated by Dmitry Dulepov almost 5 years ago

I wrote the lowest version where I detected it. I believe nothing changed in 9/10 in this area, so it must be the problem for 9/10 too. I guess the bug exists since TYPO3 3.x.

Actions #3

Updated by Benni Mack almost 5 years ago

  • Status changed from New to Accepted

HI dmitry!

thanks a lot for your report and your investigation. This is indeed a stupid bug (which I believe is there since forever), should be addressed properly!

Actions #4

Updated by Dmitry Dulepov almost 5 years ago

Benni, should we unify this table with all other tables and use hidden field? This will a breaking change but it is still doable for v10. Not for other versions though.

Locally (v8/v9) I fixed it by a DataHandler by simply checking for be_users table and disable field and set hidden instead of disable in the table. This could be also a solution (non-breaking), for all supported versions. I would actually prefer this non-breaking solution.

What do you think?

Actions #5

Updated by Benni Mack almost 5 years ago

Dmitry Dulepov wrote:

What do you think?

I think we should go with a non-breaking solution, there are lots of other TCA tables that use a different naming...

Actions #6

Updated by Dmitry Dulepov almost 5 years ago

Ok, I'll see if I have time next week to make a patch.

Actions #7

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62879

Actions #8

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62879

Actions #9

Updated by Gerrit Code Review almost 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62879

Actions #10

Updated by Gerrit Code Review almost 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62879

Actions #11

Updated by Gerrit Code Review almost 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62879

Actions #12

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62953

Actions #13

Updated by Gerrit Code Review almost 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62953

Actions #14

Updated by Gerrit Code Review almost 5 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63028

Actions #15

Updated by Benni Mack almost 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #16

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF