Skip to content

Let only weblog Admins change the files a custom theme uses (6.1.x) - #387

Open
snoopdave wants to merge 1 commit into
roller-6.1.xfrom
media-theme-files-admin-only-6.1.x
Open

snoopdave wants to merge 1 commit into
roller-6.1.xfrom
media-theme-files-admin-only-6.1.x

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

A custom theme keeps its scripts, stylesheets and images in the media library, where they are served as part of the weblog's design. Authors could replace, move or delete them like their own uploads.

  • A media file with an original path is a theme file (ThemeMediaFiles). Replacing, moving or deleting one, or deleting a folder that holds one, now needs Admin on the weblog: in the media pages (MediaFileBase, MediaFileEdit, MediaFileView) and through AtomPub (MediaCollection put and delete). Other media files are unchanged.
  • New ThemeMediaFileChangeTest (10 tests; 5 fail without the change). Full suite on JDK 11: 864 tests, 0 failures.
  • CHANGES.md entry under 6.1.8 behaviour changes. For 6.1.8 RC3.

A custom theme keeps its scripts, stylesheets and images in the media
library, where they are served as part of the weblog's design. Replacing,
moving or deleting one now needs Admin on the weblog, in the media pages
and through AtomPub. Other media files are unchanged.

@mraible mraible left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same two points as my review of #388, since the 6.1.x change works the same way: uploads migrated by upgradeUploadsDir get an originalPath and so are treated as theme files, which locks Authors out of their own old uploads, and with mediafile.originalPathEdit.enabled=true the original-path field itself isn't checked. On 6.1.x the migrated-uploads case matters more, since that's where sites upgraded from 4.x and 5.x land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants