#78860"Page edit" permissions not enough to "media" field in page properties
Description
There is a problem with the user permission, the problem is if I set the access rights for a page only to “Edit page” and not “Edit content” there is a error message if I use the media field other an other FAL field in page settings.
The Problem is the method “\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseUserPermissionCheck::addData” check if there is an record which isn’t from typ “pages” and if there is permission to “Edit content” for this PID. This part of code is on line 128-138.
There was the same problem in TYPO3 6.2 but in the old class for permission check. This ticket was resolved, but now there is the same problem with the TYPO3 7 LTS.
Previous problem in version 6.2: https://forge.typo3.org/issues/66702
Reviews 2
Related issues 1
Files 3
History 813
-
Riccardo De Contardi commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2017-05-27T23:57:01+00:00" > 05/27/17, 23:57 </span> -
Thomas Imhof commented and changed attached Screen Shot 2017-06-26 at 16.14.48.png attached Screen Shot 2017-06-26 at 16.15.09.png attached Screen Shot 2017-06-26 at 16.17.50.png priority
Should haveMust have <span data-processor="relativetime" data-value="2017-06-26T16:29:52+00:00" > 06/26/17, 16:29 </span>Thanks for the feedback.
I tested the problem now in a clean 7.6.19 and a clean 8.7.2 installation and I have still the same problem. But I have a little bit different setup with the users. My setup contains two editor users (+ admin):
1) Create two editor users “editor” and “page” and an usergroup “editor“
2) Both users have the groupe “editor“
3) The user page is the owner of the page
4) I work with the user “editor“
5) The Group has following permission (screenshot)- owner: page
- group: editor
- Show page: yes
- Edit content: no
- Edit page: yes
- Delete page: no
- New pages: no
6) switch to editor
7) Edit the page, go to Tab “Resources”> Media
8) try to add a reference -> get a code 500 (screenshot)
9) Add image as admin
10) Try to edit the page property -> get permission error (screenshot)Now I made only for this an empty project and it’s still the same.
-
Riccardo De Contardi changed status
Needs FeedbackNew <span data-processor="relativetime" data-value="2017-06-26T16:41:12+00:00" > 06/26/17, 16:41 </span> -
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2018-07-21T23:02:59+00:00" > 07/21/18, 23:02 </span>
This issue is still reproducible on both 8.7.17 and 9.4-dev (latest master) with the setup listed in the comment 2
-
Riccardo De Contardi changed parent task #90674 <span data-processor="relativetime" data-value="2020-03-07T17:21:39+00:00" > 03/07/20, 17:21 </span>
-
Christian Eßl changed category <span data-processor="relativetime" data-value="2020-03-11T21:26:56+00:00" > 03/11/20, 21:26 </span>
-
Christian Eßl commented <span data-processor="relativetime" data-value="2020-03-27T21:48:33+00:00" > 03/27/20, 21:48 </span>
Technically it’s correct, that the sys_file_reference can’t be created, as it is seen as “Content”. (For access permissions on a page, TYPO3 only distinguishes between “can edit page” and “can edit any other content”.
So I think the bug here is, that the editor is allowed to upload media files here. The buttons for adding file references should be either removed or greyed out in case, the editor is not allowed to edit content on the page. -
Gerrit Code Review pushed patch set 1 for master to change 63959 status
NewUnder Review <span data-processor="relativetime" data-value="2020-03-27T22:27:24+00:00" > 03/27/20, 22:27 </span> -
Gerrit Code Review pushed patch set 2 for master to change 63959 <span data-processor="relativetime" data-value="2020-05-25T20:45:36+00:00" > 05/25/20, 20:45 </span>
-
Gerrit Code Review pushed patch set 3 for master to change 63959 <span data-processor="relativetime" data-value="2020-05-26T18:14:48+00:00" > 05/26/20, 18:14 </span>
-
Riccardo De Contardi commented <span data-processor="relativetime" data-value="2024-05-17T19:58:15+00:00" > 05/17/24, 19:58 </span>
This issue is still reproducible on both 13.2.0-dev with the setup listed in the comment 2; but I got an error snackbar message on the bottom right corner: “Error Undefined”
-
Gerrit Code Review pushed patch set 1 for main to change 97439 <span data-processor="relativetime" data-value="2026-11-09T13:48:16+00:00" > 11/09/26, 13:48 </span>
-
Gerrit Code Review pushed patch set 2 for main to change 97439 <span data-processor="relativetime" data-value="2026-11-16T10:16:04+00:00" > 11/16/26, 10:16 </span>
I tried to reproduce the problem on 7.6.18 with the following test
1) create an “editors” usergroup and an “editor” user; assign “editor” to “editors“
2) I gave “editors” full control on every table (Access Control List)
3) I created a page with the following permission
4) switch user to editor > edit the page created at point 3
5) Tab “Resources”> Media > add relation
Result: I was able to add an image without error messages.
Do you think that this is sufficient, or a different test should be performed?