From 1464ac0675bf9004b405b38446b6ac41222f7ceb Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 15 Dec 2010 19:24:42 +0000 Subject: [PATCH] More caps back. See #15326 git-svn-id: https://develop.svn.wordpress.org/trunk@16970 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/network/site-themes.php | 10 ++++++++++ wp-admin/network/themes.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/wp-admin/network/site-themes.php b/wp-admin/network/site-themes.php index 3c47634e8f..3c8c21305b 100644 --- a/wp-admin/network/site-themes.php +++ b/wp-admin/network/site-themes.php @@ -13,6 +13,16 @@ require_once( './admin.php' ); if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); +$menu_perms = get_site_option( 'menu_items', array() ); + +if ( empty( $menu_perms['themes'] ) ) { + if ( !is_super_admin() ) + wp_die( __( 'Cheatin’ uh?' ) ); +} + +if ( !current_user_can('manage_sites') ) + wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); + $wp_list_table = get_list_table('WP_MS_Themes_List_Table'); $wp_list_table->check_permissions(); diff --git a/wp-admin/network/themes.php b/wp-admin/network/themes.php index 08a3356668..cb3aa45a6b 100644 --- a/wp-admin/network/themes.php +++ b/wp-admin/network/themes.php @@ -13,6 +13,16 @@ require_once( './admin.php' ); if ( ! is_multisite() ) wp_die( __( 'Multisite support is not enabled.' ) ); +$menu_perms = get_site_option( 'menu_items', array() ); + +if ( empty( $menu_perms['themes'] ) ) { + if ( !is_super_admin() ) + wp_die( __( 'Cheatin’ uh?' ) ); +} + +if ( !current_user_can('manage_network_themes') ) + wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); + $wp_list_table = get_list_table('WP_MS_Themes_List_Table'); $wp_list_table->check_permissions();