No access to orders/coupons for non shop-managers/admin

This commit is contained in:
Mike Jolley 2011-11-19 21:22:22 +00:00
parent fe5651fff5
commit a04551bd35
1 changed files with 22 additions and 0 deletions

View File

@ -238,6 +238,17 @@ function woocommerce_post_type() {
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'capabilities' => array(
'publish_posts' => 'manage_woocommerce',
'edit_posts' => 'manage_woocommerce',
'edit_others_posts' => 'manage_woocommerce',
'delete_posts' => 'manage_woocommerce',
'delete_others_posts'=> 'manage_woocommerce',
'read_private_posts'=> 'manage_woocommerce',
'edit_post' => 'manage_woocommerce',
'delete_post' => 'manage_woocommerce',
'read_post' => 'manage_woocommerce',
),
'publicly_queryable' => false,
'exclude_from_search' => true,
'show_in_menu' => $show_in_menu,
@ -271,6 +282,17 @@ function woocommerce_post_type() {
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'capabilities' => array(
'publish_posts' => 'manage_woocommerce',
'edit_posts' => 'manage_woocommerce',
'edit_others_posts' => 'manage_woocommerce',
'delete_posts' => 'manage_woocommerce',
'delete_others_posts'=> 'manage_woocommerce',
'read_private_posts'=> 'manage_woocommerce',
'edit_post' => 'manage_woocommerce',
'delete_post' => 'manage_woocommerce',
'read_post' => 'manage_woocommerce',
),
'publicly_queryable' => true,
'exclude_from_search' => true,
'show_in_menu' => $show_in_menu,