Changeset 16990
- Timestamp:
- 12/16/2010 08:43:22 AM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r16900 r16990 13 13 14 14 $wp_list_table = get_list_table('WP_Comments_List_Table'); 15 $wp_list_table->check_permissions();16 15 $pagenum = $wp_list_table->get_pagenum(); 17 16 -
trunk/wp-admin/edit-tags.php
r16980 r16990 14 14 15 15 $wp_list_table = get_list_table('WP_Terms_List_Table'); 16 $wp_list_table->check_permissions();17 16 18 17 $title = $tax->labels->name; -
trunk/wp-admin/edit.php
r16980 r16990 25 25 26 26 $wp_list_table = get_list_table('WP_Posts_List_Table'); 27 $wp_list_table->check_permissions();28 27 $pagenum = $wp_list_table->get_pagenum(); 29 28 -
trunk/wp-admin/includes/class-wp-ms-themes-list-table.php
r16967 r16990 40 40 $menu_perms = get_site_option( 'menu_items', array() ); 41 41 42 if ( empty( $menu_perms['themes'] ) ) { 43 if ( !is_super_admin() ) 44 wp_die( __( 'Cheatin’ uh?' ) ); 45 } 42 if ( empty( $menu_perms['themes'] ) && ! is_super_admin() ) 43 wp_die( __( 'Cheatin’ uh?' ) ); 46 44 47 45 if ( $this->is_site_themes && !current_user_can('manage_sites') ) 48 46 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 49 else 47 elseif ( !$this->is_site_themes && !current_user_can('manage_network_themes') ) 50 48 wp_die( __( 'You do not have sufficient permissions to manage network themes.' ) ); 51 49 } -
trunk/wp-admin/includes/class-wp-plugins-list-table.php
r16988 r16990 32 32 $menu_perms = get_site_option( 'menu_items', array() ); 33 33 34 if ( empty( $menu_perms['plugins'] ) ) { 35 if ( !is_super_admin() ) 36 wp_die( __( 'Cheatin’ uh?' ) ); 37 } 34 if ( empty( $menu_perms['plugins'] ) && ! is_super_admin() ) 35 wp_die( __( 'Cheatin’ uh?' ) ); 38 36 } 39 37 -
trunk/wp-admin/includes/class-wp-themes-list-table.php
r16838 r16990 13 13 14 14 function check_permissions() { 15 if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') ) 15 // Do not check edit_theme_options here. AJAX calls for available themes require switch_themes. 16 if ( !current_user_can('switch_themes') ) 16 17 wp_die( __( 'Cheatin’ uh?' ) ); 17 18 } -
trunk/wp-admin/includes/class-wp-users-list-table.php
r16900 r16990 26 26 27 27 function check_permissions() { 28 if ( ! current_user_can('list_users') )29 wp_die( __('Cheatin’ uh?'));30 31 if ( $this->is_site_users && ! current_user_can('manage_sites') )32 wp_die(__( 'You do not have sufficient permissions to edit this site.'));28 if ( ! $this->is_site_users && ! current_user_can( 'list_users' ) ) 29 wp_die( __( 'Cheatin’ uh?' ) ); 30 31 if ( $this->is_site_users && ! current_user_can( 'manage_sites' ) ) 32 wp_die(__( 'You do not have sufficient permissions to edit this site.' ) ); 33 33 } 34 34 -
trunk/wp-admin/link-manager.php
r16980 r16990 13 13 14 14 $wp_list_table = get_list_table('WP_Links_List_Table'); 15 $wp_list_table->check_permissions();16 15 17 16 // Handle bulk deletes -
trunk/wp-admin/network/site-themes.php
r16984 r16990 16 16 $menu_perms = get_site_option( 'menu_items', array() ); 17 17 18 if ( empty( $menu_perms['themes'] ) ) { 19 if ( !is_super_admin() ) 20 wp_die( __( 'Cheatin’ uh?' ) ); 21 } 18 if ( empty( $menu_perms['themes'] ) && ! is_super_admin() ) 19 wp_die( __( 'Cheatin’ uh?' ) ); 22 20 23 if ( ! current_user_can('manage_sites') )21 if ( ! current_user_can( 'manage_sites' ) ) 24 22 wp_die( __( 'You do not have sufficient permissions to manage themes for this site.' ) ); 25 23 … … 35 33 36 34 $wp_list_table = get_list_table('WP_MS_Themes_List_Table'); 37 $wp_list_table->check_permissions();38 35 39 36 $action = $wp_list_table->current_action(); -
trunk/wp-admin/network/site-users.php
r16984 r16990 18 18 19 19 $wp_list_table = get_list_table('WP_Users_List_Table'); 20 $wp_list_table->check_permissions();21 20 $wp_list_table->prepare_items(); 22 21 -
trunk/wp-admin/network/sites.php
r16981 r16990 14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 if ( ! current_user_can( 'manage_sites' ) ) 17 wp_die( __( 'You do not have permission to access this page.' ) ); 18 16 19 $wp_list_table = get_list_table('WP_MS_Sites_List_Table'); 17 $wp_list_table->check_permissions();18 20 19 21 $title = __( 'Sites' ); -
trunk/wp-admin/network/themes.php
r16981 r16990 16 16 $menu_perms = get_site_option( 'menu_items', array() ); 17 17 18 if ( empty( $menu_perms['themes'] ) ) { 19 if ( !is_super_admin() ) 20 wp_die( __( 'Cheatin’ uh?' ) ); 21 } 18 if ( empty( $menu_perms['themes'] ) && ! is_super_admin() ) 19 wp_die( __( 'Cheatin’ uh?' ) ); 22 20 23 21 if ( !current_user_can('manage_network_themes') ) … … 25 23 26 24 $wp_list_table = get_list_table('WP_MS_Themes_List_Table'); 27 $wp_list_table->check_permissions();28 25 29 26 $action = $wp_list_table->current_action(); -
trunk/wp-admin/network/users.php
r16983 r16990 14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 if ( ! current_user_can( 'manage_network_users' ) ) 17 wp_die( __( 'You do not have permission to access this page.' ) ); 18 16 19 $wp_list_table = get_list_table('WP_MS_Users_List_Table'); 17 $wp_list_table->check_permissions();18 20 $wp_list_table->prepare_items(); 19 21 -
trunk/wp-admin/plugin-install.php
r16900 r16990 12 12 /** WordPress Administration Bootstrap */ 13 13 require_once('./admin.php'); 14 14 15 if ( ! current_user_can('install_plugins') ) 15 16 wp_die(__('You do not have sufficient permissions to install plugins on this site.')); … … 21 22 22 23 $wp_list_table = get_list_table('WP_Plugin_Install_List_Table'); 23 $wp_list_table->check_permissions();24 24 $wp_list_table->prepare_items(); 25 25 -
trunk/wp-admin/plugins.php
r16989 r16990 10 10 require_once('./admin.php'); 11 11 12 if ( is_multisite() ) { 13 $menu_perms = get_site_option( 'menu_items', array() ); 14 15 if ( empty( $menu_perms['plugins'] ) && ! is_super_admin() ) 16 wp_die( __( 'Cheatin’ uh?' ) ); 17 } 18 12 19 if ( !current_user_can('activate_plugins') ) 13 20 wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) ); 14 21 15 22 $wp_list_table = get_list_table('WP_Plugins_List_Table'); 16 $wp_list_table->check_permissions();17 23 18 24 $action = $wp_list_table->current_action(); -
trunk/wp-admin/theme-install.php
r16900 r16990 12 12 /** WordPress Administration Bootstrap */ 13 13 require_once('./admin.php'); 14 14 15 if ( ! current_user_can('install_themes') ) 15 16 wp_die( __( 'You do not have sufficient permissions to install themes on this site.' ) ); … … 21 22 22 23 $wp_list_table = get_list_table('WP_Theme_Install_List_Table'); 23 $wp_list_table->check_permissions();24 24 $wp_list_table->prepare_items(); 25 25 -
trunk/wp-admin/themes.php
r16979 r16990 9 9 /** WordPress Administration Bootstrap */ 10 10 require_once('./admin.php'); 11 11 12 if ( !current_user_can('switch_themes') && !current_user_can('edit_theme_options') ) 12 13 wp_die( __( 'Cheatin’ uh?' ) ); 13 14 14 15 $wp_list_table = get_list_table('WP_Themes_List_Table'); 15 $wp_list_table->check_permissions();16 16 17 17 if ( current_user_can( 'switch_themes' ) && isset($_GET['action'] ) ) { -
trunk/wp-admin/upload.php
r16868 r16990 10 10 require_once( './admin.php' ); 11 11 12 if ( !current_user_can('upload_files') ) 13 wp_die( __( 'You do not have permission to upload files.' ) ); 14 12 15 $wp_list_table = get_list_table('WP_Media_List_Table'); 13 $wp_list_table->check_permissions();14 16 15 17 // Handle bulk actions -
trunk/wp-admin/users.php
r16980 r16990 10 10 require_once( './admin.php' ); 11 11 12 if ( ! current_user_can( 'list_users' ) ) 13 wp_die( __( 'Cheatin’ uh?' ) ); 14 12 15 $wp_list_table = get_list_table('WP_Users_List_Table'); 13 $wp_list_table->check_permissions();14 16 15 17 $title = __('Users');
Note: See TracChangeset
for help on using the changeset viewer.