Skip to content

Make the Design pages follow the custom-theme setting - #270

Open
snoopdave wants to merge 1 commit into
roller-6.1.xfrom
design-pages-custom-theme-setting
Open

snoopdave wants to merge 1 commit into
roller-6.1.xfrom
design-pages-custom-theme-setting

Conversation

@snoopdave

Copy link
Copy Markdown
Contributor

The Design menu (theme, stylesheet and templates) is shown only while themes.customtheme.allowed is on, but the actions behind it didn't check that setting.

  • ThemeEdit, Templates, TemplateEdit and StylesheetEdit return the setting from isFeatureEnabled(), so UISecurityInterceptor treats them the way the menu does. Templates also covers its add/remove subactions.
  • The XML-RPC blogger.setTemplate call checks the same setting. getTemplate is unchanged.
  • Weblogs that already use custom templates keep rendering them. CHANGES notes the behaviour change under 6.1.8.

Tests: DesignPagesFeatureTest checks the four actions with the setting on and off. XMLRPCWeblogPermissionTest turns the setting on for its existing checks and adds one for setTemplate with it off. Both fail on roller-6.1.x and pass here. mvn -pl app test: 500 tests, 0 failures.

Once this is merged, the same change goes to master for 7.0.0.

The Design menu is shown only while themes.customtheme.allowed is on, but
the theme, stylesheet and template actions behind it did not check that
setting. They now return it from isFeatureEnabled(), so the security
interceptor treats them like the menu does. The XML-RPC blogger.setTemplate
call checks the same setting.

Weblogs that already use custom templates keep rendering them.

@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.

LGTM. The four Design actions now follow themes.customtheme.allowed the same way the menu does, and on 6.1.x these are all of the Design actions. The blogger.setTemplate check runs after authentication and before anything is saved. For the master port: the XML-RPC rewrite in #263 kept BloggerAPIHandler, so the same change should apply there.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants