Hello,

Users without selling permissions can still see a selling tab when they visit their account. However, when the users click on any of the sub-tabs (products, settings) they get an access denied page.

1) Users who should not act as sellers have the permissions -- act as a seller, view own products, view own reports --UNCHECKED.
2) These same users can still see the selling tab under their account.

Thanks,

KH

PS: Just want to add that this is a great module, thanks so much! I will report bugs/issue as much as I can to help out (new to Drupal/PHP--:)

Comments

duckzland’s picture

Status: Fixed » Active

I got the same issue

fixing can be done by a slight change in mp_products.module :

function mp_products_menu() {
$items = array();

$items['user/%user/selling'] = array(
'title' => 'Selling',
'description' => 'View and manage your products and orders.',
'page callback' => 'mp_products_selling_overview',
'page arguments' => array(1),
'access callback' => 'mp_products_can_view_seller',
'access arguments' => array('act as seller'), // change this from array(1)
'type' => MENU_LOCAL_TASK,
'file' => 'mp_products.admin.inc',
);

sorry I cannot provide proper patch, don't have linux running and don't have time to learn how to create patch in windows :>

EDIT: SCRATCH THE ABOVE instead just change the mp_products_can_view_seller function to below, and leave the above unchanged:

function mp_products_can_view_seller($seller) {
global $user;
return (((user_access('view own products') || arg(3) == '') && ($user->uid == arg(1))) || user_access('administer sellers'));
}

EDIT: A better fix for people who uses users/username as their path

function mp_products_can_view_seller($seller) {
global $user;
if (is_numeric(arg(1))) {
$current_page = arg(1);
} else {
$current_page = $seller->uid;
}
return (((user_access('view own products') || arg(3) == '') && ($user->uid == $current_page)) and user_access('act as seller') || user_access('administer sellers'));
}

syndicateStorm’s picture

Status: Active » Fixed

Status: Active » Closed (fixed)

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

fehin’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta1
Status: Closed (fixed) » Active

This says fixed but my non sellers still have the selling tab.

syndicateStorm’s picture

Make sure you do not have "administer sellers" or "act as seller" checked. Let me know what you find out so we can close out this bug. Cheers.

fehin’s picture

I have "act as seller" checked only for roles that I want to be sellers and "administer sellers" for admin. Non seller roles still shows this tab.

syndicateStorm’s picture

I'm assuming you're seeing this under "My Account"?

If so, I can't duplicate the bug? I have two Drupal 6 installs with Marketplace and neither one shows the Selling tab. Maybe as a test you could uncheck "act as seller" for all roles? If you have any other ideas let me know, otherwise I'm not sure I'll be able to recreate this...

syndicateStorm’s picture

Status: Active » Postponed (maintainer needs more info)
fehin’s picture

As user1, I see this tab on non-seller profiles but when I login as a non-seller it doesn't show so I guess it ok.

syndicateStorm’s picture

Status: Postponed (maintainer needs more info) » Fixed

I see, I didn't quite grasp what you were saying. I wonder which way would be preferable? Do you have an opinion? I'll give this some thought myself, later tonight.

Well, I guess the user could have previously been a seller, but if they lost their selling rights, the admin should still be able to see their seller tab. Maybe we should leave it as is. Let me know if you disagree.

fehin’s picture

You can leave it as is for history purpose.

Status: Fixed » Closed (fixed)
Issue tags: -access permissions, -ubercart marketplace, -My Account, -selling tab

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