Review main Abandoned

50896[TASK] Change type column of be_user to type select

Daniel Windloff CR 0 V 0 Easy +21 −2 updated 05/12/17, 06:33

Commit message

In order to be consistent (page, tt_content, ...),
change the type column of the backend user from checkbox to select.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 710

  1. Daniel Windloff uploaded patch set 1 12/08/16, 06:58

  2. Daniel Windloff rebased onto patch set 2 12/08/16, 07:00

  3. TYPO3com voted on patch set 1 V +1 12/08/16, 07:02 Completed build in 04m 28s on Thu, 8 Dec, 08:02 AM Test Summary: 54373 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5590

  4. TYPO3com voted on patch set 2 V +1 12/08/16, 07:05 Completed build in 05m 01s on Thu, 8 Dec, 08:05 AM Test Summary: 54373 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5591

  5. Daniel Windloff uploaded patch set 3 12/08/16, 07:38

  6. TYPO3com voted on patch set 3 V +1 12/08/16, 07:42 Completed build in 04m 03s on Thu, 8 Dec, 08:42 AM Test Summary: 54373 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-5592

  7. Mathias Brodala commented on patch set 3 CR -1 12/08/16, 08:40

    I agree with consistency but the field is named "admin", not "type" and evaluated as such troughout the core. Every location where $user['admin'] is involved only does a boolean check. Thus if we change the type to select here, we invite people to add more roles which will then always have admin status, no matter the intended purpose. Thus if you want to go this route, you should introduce a new "type" field instead, migrate the core code to that field and deprecate the "admin" field.
  8. Daniel Windloff commented on patch set 3 12/08/16, 09:11

    Yes, but the column "admin" is referenced by the ctrl - type, so it is somehow also a type at the moment. So the configuration is also used (as normal type configuration) for the display settings. A type icon is defined and used in the list module and (as overlay) also in the backend user module. But this relation isn't explained in the edit context. Would it be ok for you if I introduce a new renderType=userRole, that has the same behaviour as the current approach for the user, but always returns the two possible values (0:user/1:admin) without the possibility to add new items (to avoid the possible miss configuration you point at)?
  9. Mathias Brodala commented on patch set 3 12/08/16, 10:09

    Limiting the set of values after turning the field into a select would be unexpected for 3rd party people. If a limit is applied then it becomes questionable why the field was changed from checkbox to select in the first place. In any case you'll need to change the core code to explicitly check against "1" to be safe from 3rd party values. Again: introducing a proper "type" field for this would be way cleaner and make its purpose obvious. The explicit check would be necessary here too, of course.
  10. Daniel Windloff abandoned the change 05/12/17, 06:33

    Abandon. The prefered method to solve the given ux issue would be to introduce serveral renderTypes for type check.