fix(acl): Media access policy menu, file editor, and browser unpack - #5
Open
Ibochkarev wants to merge 4 commits into
Open
fix(acl): Media access policy menu, file editor, and browser unpack#5Ibochkarev 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.
Что сделано
Частичный фикс для #14468. Три коммита на ветке закрывают пункты из комментария к issue и второй проход по ключам, которые всё ещё были неверны в коде или лексиконе.
Коммит 1 — меню, Save редактора, распаковка браузера
file_managerснят с родительской строкиmedia(апгрейд3.3.0-plвключён).file_view, Save наfile_update+ sourcesave, чтение блокируется без sourceview.unpackFileнаMODx.browser.View.Коммит 2 — eslint для нового JS-обработчика.
Коммит 3 — остальная точность Media ACL
4.
Browser/File/Getпроверял политику источникаdeleteвместоview(баг копипасты с 2013). Исправлено в соответствие с Download/Unpack.5. Ссылки дерева и браузера
page(клик-редактирование) теперь требуютfile_viewи sourceview. Без них Rename (file_update) остаётся, но Edit / Quick Update и шорткаты клика по узлу исчезают.6. Английский лексикон:
directory_chmodописывает Set Visibility, а не chmod.file_createvsfile_uploadрасписаны. Отмечено, что политики Media Source — второй гейт наfile_view/file_update.Намеренно не тронуто (по анализу 2026): ортогональность
file_list/directory_list, отдельные ключиfile_uploadvsfile_create, Refresh / copy-path без файловых ключей, переименование ключаdirectory_chmod, Packagesfile_upload(#14436), вкладка Sources / Files (#14435, #14467),#16595/menu_media.Как проверить
Меню — политика с
sources, безfile_manager: Media виден, Sources работает, Browser скрыт.?a=media/browserотказ.Файловый редактор —
file_viewвкл,file_updateвыкл: редактор открывается read-only, без Save. Оба вкл + sourcesave: Save работает.file_view в дереве — без
file_view: нет клик-редактирования файловых узлов, нет Edit / Quick Update в меню. Толькоfile_view: клик открывает редактор, без Save.Browser/File/Get — пользователь с source
view, но безdeleteможет быстро прочитать файл (раньше блокировалось).Распаковка — контекстное меню zip в правой панели Media Browser, без ошибок в консоли.
Апгрейд — родительская строка
mediaимеет пустыеpermissionsпосле3.3.0-pl.PHPUnit
Оригинал: modxcms#17010