fix(acl): Media access policy menu, file editor, and browser unpack - #17010
Open
Ibochkarev wants to merge 4 commits into
Open
fix(acl): Media access policy menu, file editor, and browser unpack#17010Ibochkarev wants to merge 4 commits into
Ibochkarev wants to merge 4 commits into
Conversation
Remove file_manager from the Media top menu parent so Sources remains reachable without the browser permission. Gate file editor Save on file_update and source policies, and add unpackFile to Media Browser view.
Use const, template literals, and trailing commas in the unpackFile block.
…ms#14468) Use source view policy in Browser/File/Get, hide tree page links without file_view, and clarify en permission descriptions for visibility and upload vs create.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed and why
Partial fix for #14468. Three commits on this branch cover the items I called out in the issue comment, plus a second pass on the keys that were still wrong in code or lexicon.
Commit 1 — menu, editor Save, browser unpack
file_manageroff the parentmediarow (upgrade3.3.0-plincluded).file_view, Save onfile_update+ sourcesave, read blocked without sourceview.unpackFileonMODx.browser.View.Commit 2 — eslint on the new JS handler.
Commit 3 — remaining Media ACL accuracy
4.
Browser/File/Getchecked source policydeleteinstead ofview(copy-paste bug since 2013). Fixed to match Download/Unpack.5. Tree and browser
pagelinks (click-to-edit) now requirefile_viewand sourceview. Without it you keep Rename (file_update) but lose Edit / Quick Update menu entries and the node click shortcut.6. English lexicon:
directory_chmoddescribes Set Visibility, not chmod.file_createvsfile_uploadspelled out. Notes that Media Source policies are a second gate onfile_view/file_update.Left alone on purpose (matches the 2026 issue analysis):
file_list/directory_listorthogonality, separatefile_uploadvsfile_createkeys, folder Refresh / copy-path without file keys, renamingdirectory_chmodpermission key, Packagesfile_upload(#14436), Sources / Files tab (#14435, #14467),#16595/menu_media.How to test
Menu — policy with
sources, withoutfile_manager: Media shows, Sources works, Browser hidden.?a=media/browserdenied.File editor —
file_viewon,file_updateoff: editor opens read-only, no Save. Both on + sourcesave: Save works.file_view on tree — without
file_view: no click-to-edit on file nodes, no Edit / Quick Update in menu. Withfile_viewonly: click opens editor, no Save.Browser/File/Get — user with source
viewbut notdeletecan quick-read a file (was blocked before).Unpack — zip context menu in Media Browser right panel, no console error.
Upgrade — parent
mediarow has emptypermissionsafter3.3.0-pl.PHPUnit
7 tests, exit 0 (checked locally).
Also smoke-tested on
revolution.test(admin): login, Media submenu, browser, zip Unzip menu, file editor Save.Related issue(s)/PR(s)
Refs #14468
Related: #16595, #14435, #14436, #14467
Compatibility notes
Manager ACL/UI + en lexicon only. No CHANGELOG entry. Existing sites need upgrade script or manual menu fix.
Breaking change assessment
No API changes. Stricter UI: no tree click-to-edit without
file_view.Browser/File/Getnow honors sourceviewinstead of wrongly requiringdelete.Test coverage
MediaAccessPolicyTest— transport menu, File/Get policy, treepagegate, lexicon stringsSystemFileEditControllerTest— file editor permissions and browser unpack handlerContributors
@Ruslan-Aleev opened the issue. Scope and re-check in #14468 comments.