The code for the stock menu item is:

  $items['node/%node/edit/uc-stock'] = array(
    'title' => 'Stock',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('uc_stock_edit_form', 1),
    'access arguments' => array('administer product stock'),
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
    'file' => 'uc_stock.admin.inc',
  );

So, this will show up on any node regardless of whether it's a product or not. This needs to be fixed with a solution like the attribute module, which uses a custom access callback to determine whether or not a tab should be displayed for the node:

  $items['node/%node/edit/uc-attributes'] = array(
    'title' => 'Attributes',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('uc_object_attributes_form', 1, 'product', 'overview'),
    'access callback' => 'uc_attribute_product_access',
    'access arguments' => array(1),
    'type' => MENU_LOCAL_TASK,
    'weight' => 1,
    'file' => 'uc_attribute.admin.inc',
  );
CommentFileSizeAuthor
#1 434852.stock_perms.2.x.patch941 bytescha0s
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cha0s’s picture

FileSize
941 bytes

Patch action. (Assuming product kits should be disallowed.)

Island Usurper’s picture

Status: Active » Fixed

Cool, cool.

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.