Bug #77598
openEpic #83669: Improve file list / file browser
Editor without 'Files: Replace' option gets file replace option in the "File exists" modal
0%
Description
When an editor doesn't have the permission to replace a file he still gets the option to replace a file in the "File exists" modal that appears when uploading an already existing file.
The upload bar goes to 100% and then it freezes. After page reload you see the flash message that the users isn't allowed to replace a file
Files
Updated by Guido Schmechel almost 6 years ago
State 9.4-dev:
Option "Overwrite" is selectable, backend throws error "You are not allowed to override..." but nothing freezes
Modal is build via TypeScript and there is no permission check for these options.
Updated by Riccardo De Contardi 12 months ago
- File cattura1.png cattura1.png added
- File cattura3.png cattura3.png added
- File cattura2.png cattura2.png added
On version 13 there is a regression , AFAICS:
My test¶
1) Create a usergroup "test" give full access except [file_permissions]
: do not check Files: Replace [replaceFile]
; give proper permissions to at least a page, mount points
2) Create a user "test" belonging to group "test"
3) Switch user > "test"
4) Filelist module > Upload a file e.g. "logo.png" > OK
5) Try to upload a file with the same name
6) Select "overwrite" on the modal window
7) Continue with the action
Result:
The file is actually uploaded, it seems that the permissions are not taken into consideration at all
Test 2¶
(Steps 1-3 done before)
4) Go to a page accessible for "test" user and create a Content Element ("Text and Image"
5) Add the "logo.png" image, save
6) Click to add another file, on the modal window choose to upload a file with the same name ("logo.png") on the folder where the other is saved
7) mind to flag "overwrite existing file" see screenshot:
8) Click on "upload"
Result:
The file is actually uploaded, it seems that
a) The modal shown on cattura1.png is not called (UX inconsistency)
b) the permissions are not taken into consideration at all as on the first test.
NOTE¶
If you repeat "test 2" but don't check "overwrite existing file" an error is shown:
But the error seems independent from the permissions given (it occurs also with an admin user) - but I don't understand what it means. Shouldn't the file be renamed?