Task #91627

Show full path of allowedFileMounts in new form modal

Added by Florian Seirer over 1 year ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2020-06-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Sprint Focus:
Remote Sprint

Description

We have a long list of directories listed in TYPO3:CMS:Form:persistenceManager:allowedFileMounts so that different editor groups can save their form configs in their own file mount. This way, editors cannot edit other editors forms if the yaml files were all in one folder.

TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedFileMounts:
          10: 1:/form-configs/
          20: 1:/folder-a/form-configs/
          30: 1:/folder-b/form-configs/
          40: 1:/folder-c/form-configs/
          50: 1:/folder-d/form-configs/
          ...

This poses a problem for editors who have permissions for several groups:
When creating a new form the modal shows a list of all available configuration folders with the same name ("form-configs") instead of the full path. So the editor picks the first entry in the list, and this could lead to other editors with overlapping permissions to not be able to edit that form.

A quick way to solve this would be to show the full path in the select field of the modal.


Related issues

Related to TYPO3 Core - Task #94806: Streamline and modernize form managerClosed2021-08-11

Actions
#1

Updated by Florian Seirer over 1 year ago

  • Category set to Form Framework
#2

Updated by Florian Seirer over 1 year ago

I was able to fix it by myself in /typo3/sysext/form/Resources/Public/JavaScript/Backend/FormManager/ViewModel.js around line 110:

          ...
          if (folders.length > 1) {
            savePathSelect = $('<select class="new-form-save-path form-control" data-identifier="newFormSavePath" />');
            for (var i = 0, len = folders.length; i < len; ++i) {
              // var option = new Option(folders[i]['label'], folders[i]['value']);
              var option = new Option(folders[i]['value'].slice(2), folders[i]['value']);
              $(savePathSelect).append(option);
            }
          }
          ...

Works for me on TYPO3 8.7, but I'm not sure is this is the best way to do this.

#3

Updated by Bjoern Jacob 3 months ago

  • Tracker changed from Bug to Task
  • TYPO3 Version changed from 8 to 11
  • Sprint Focus set to Remote Sprint
#4

Updated by Bjoern Jacob 2 months ago

  • Related to Task #94806: Streamline and modernize form manager added
#5

Updated by Gerrit Code Review 2 months ago

  • Status changed from New 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/+/70540

#6

Updated by Gerrit Code Review 2 months 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/+/70540

#7

Updated by Gerrit Code Review 2 months 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/+/70540

#8

Updated by Gerrit Code Review 2 months 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/+/70540

#9

Updated by Gerrit Code Review 2 months 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/+/70540

#10

Updated by Gerrit Code Review 2 months ago

Patch set 6 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/+/70540

#11

Updated by Gerrit Code Review 2 months ago

Patch set 7 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/+/70540

#12

Updated by Andreas Steiger 2 months ago

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

Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF