89572[BUGFIX] Fix negated disallowed check in drag-uploader
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- Andreas Kienast +1
-
Verified V +2 Done
- Oli Bartsch +2
- Garvin Hicking +1
- core-ci +1 CI
Issues 2
Files 2
Review log 1315
-
Benjamin Franzke uploaded patch set 1 05/27/25, 15:13
-
core-ci voted on patch set 1 V +1 05/27/25, 15:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79582
-
Nikita Hovratov voted on patch set 1 CR +1 05/27/25, 16:02
-
Andreas Kienast voted on patch set 1 CR +1 V +1 05/28/25, 07:05
-
Garvin Hicking commented on patch set 1 CR +1 V +1 05/28/25, 07:15
personally I would probably rename this: checkAllowedExtensions -> isAllowedFileExtension() (return types unchanged) checkDisallowedExtensions -> isDisallowedFileExtension() (return types unchanged, but query it with `this.isDisallowedFileExtension()` instead `!checkDisallowedExtensions()`. Having said this, current approach works to bit is a bit mind-boggley :D -
Benjamin Franzke commented on patch set 1 CR -1 05/28/25, 08:01
Reply
well, we thought the same. So let's go ahead and do that! :) -
Benjamin Franzke uploaded patch set 2
CR +1V +105/28/25, 08:12 -
Benjamin Franzke commented on patch set 2 05/28/25, 08:12
Reply
Done -
Andreas Kienast voted on patch set 2 CR +1 05/28/25, 08:14
-
core-ci voted on patch set 2 V +1 05/28/25, 08:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79614
-
Garvin Hicking commented on patch set 2 CR +1 V +1 05/28/25, 08:47
Reply
(nitpick: we don't use "prohibited" really anywhere, and coupling "prohibited" with "disallowed" is a bit of unneeded cognitive load, so I'd really opt for either "isGranted" (a term used more often in our codebase) or "isAllowedByFileExtensionList" and "isDisallowedByFileExtensionList" - that reduces it to one usage of dis/allowed) (Not going to die on this hill, though :D) -
Benjamin Franzke commented on patch set 2 05/28/25, 12:21
Reply
I wanted a term that is *not* "disallowed" in order to distinguish from the allow and disallow lists. I think the term "grants" fits better into permissions and I'd like a term that describes the non-allowed case, in order to avoid the negation by the caller in the condition where this method is used.. -
Garvin Hicking commented on patch set 2 05/28/25, 15:29
Reply
Filed under "naming things", let's move on :-D -
Oli Bartsch voted on patch set 2 CR +2 V +2 05/29/25, 09:25
-
Oli Bartsch merged patch set 3 05/29/25, 09:25