Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#42674 closed defect (bug) (fixed)

Multisite issue: Customizer display message to add themes to blog to non super admins

Reported by: lenasterg Owned by: westonruter
Priority: normal Milestone: 4.9.3
Component: Customize Version: 4.9
Severity: normal Keywords: has-patch fixed-major commit
Cc: Focuses: multisite

Description

Hi.
This is a multisite issue.
The Customizer displays message to install themes and link to .../wp-admin/theme-install.php, without checking if the user is a super admin or a simple blog admin.
So the user after clicking the link gets the "Sorry, you are not allowed to install themes on this site." error.

Attachments (1)

42674.diff (1.9 KB ) - added by flixos90 9 years ago.

Download all attachments as: .zip

Change History (11)

#1 @lenasterg
9 years ago

  • Summary Mulisite issue: Customizer display message to add themes to blog to non super adminsMultisite issue: Customizer display message to add themes to blog to non super admins

#2 @lenasterg
9 years ago

The js notification with the link to admin_url( 'theme-install.php' ) is the 'themeInstallUnavailable' defined at https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-loader.php#L599
and is displayed in:
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/customize-controls.js#L3078

#3 @westonruter
9 years ago

  • Keywords needs-patch added
  • Milestone Awaiting Review4.9.2

@flixos90
9 years ago

#4 @flixos90
9 years ago

  • Keywords has-patch added; needs-patch removed

42674.diff adds an additional JS variable that contains whether the current user can install themes. The message is then only shown if they can and if filesystem credentials are needed.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


9 years ago

#6 @westonruter
9 years ago

  • Owner set to westonruter
  • Status newreviewing

#7 @dd32
9 years ago

  • Milestone 4.9.24.9.3

Bumping to 4.9.3 due to 4.9.2s release

#8 @westonruter
9 years ago

  • Resolutionfixed
  • Status reviewingclosed

In 42536:

Customize: Prevent showing SFTP theme installation notification in multisite when user cannot install themes.

Props flixos90.
See #37661, #42184.
Fixes #42674.

#9 @westonruter
9 years ago

  • Keywords fixed-major commit added
  • Resolution fixed
  • Status closedreopened

#10 @westonruter
9 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 42537:

Customize: Prevent showing SFTP theme installation notification in multisite when user cannot install themes.

Props flixos90.
See #37661, #42184.
Fixes #42674 for 4.9 branch.

Note: See TracTickets for help on using tickets.