9 replies [Last post]
Webel's picture
Offline
Joined: 03/22/2009
Juice: 14
Was this information Helpful?

I have created a special role 'retail' for store admin, product creation etc.

The 'retail' role has 'administer store' permissions, and in fact can perform the store admin functions,
however the store administration dashboard only shows for the full admin user.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Can't get 'Store administration' dashboard to show for authe

Can you post a screenshot of what shows up if you use someone w/ just the retail role? In the module, 'administer store' permission should be all that's required to visit that page, so I suppose one of the API funcs I'm using to build that page could have some hidden limitation...

frosty's picture
Offline
Joined: 04/26/2009
Juice: 11
seeing same problem

Hi!

I am seeing the same thing with a recent install - as of today (4/26/09).

drupal 6.10

ubercart 6.x-2.0-rc1

frosty's picture
Offline
Joined: 04/26/2009
Juice: 11
work-around for missing dashboard

To get the dashboard to show up, I enabled

System module->access administration pages

Works, but they have a new menu item with submenus that take them to empty pages! (Like site building, etc.)

I made a new admin menu, added a nice menus block for it, and moved the offending admin menu there. Only admins could see this block. Looked like this would fix everything - hide the useless administration menu that was showing up for store administrators, while allowing them to keep the permission to access administration pages - and thus keep the dashboard!

But, when I logged in with the store manager role, the dashboard disappeared!

I moved the menu back under the Navigation menu, and the dashboard re-appeared!

The dashboard seems connected with the admin menu.

frosty's picture
Offline
Joined: 04/26/2009
Juice: 11
dashboard visibility workaround - more info...

The dashboard seems not tied with the admin menu, just the STORE admin menu...

Even with permission to access administration pages, the dashboard was hidden as long as the admin menu was hidden, but visible when the Admin menu was visible.

But it turns out that only PART of the Administration menu needed to be visible - the STORE administration submenu!

I moved the STORE admin menu directly under Navigation, OUT of the Administration menu. Then I moved the Administration menu completely out of Navigation, into a new menu I created and which was in a separate nice menus block - visible only by admins.

So, finally,

- the store administrator can see the dashboard
- the store administrator does NOT see lots of menu items for pages he can't use

The interesting thing is that only the STORE admin menu needed to under the Navigation menu, not the entire Administration menu.

Hope this helps with a clue to what's going on in the code.

frosty's picture
Offline
Joined: 04/26/2009
Juice: 11
Dashboard...

I found that moving the Store Administration menu, as in my previous posts, ONLY worked when it was not directly under Navigation, but at the 2nd level - just as it was when it was underneath Administration (Navigation - Administration - Store administration). So, I had something like Navigation - Store admin - Store administration, which seemed redundant.

The dashboard still worked though when this 2nd level Store administration menu was disabled, just so long as the menu was at the 2nd level under Navigation. (I created a different, separate Store Administration menu item to go directly under Navigation so users would have a non-redundant menu item.)

hellslam's picture
Offline
Joined: 09/30/2009
Juice: 2
Re: Dashboard...

Sorry about the thread resurrection, but I just ran into this.

The theme_uc_admin_dashboard function creates the dashboard based on an array of links it culls from the menu_navigation_links Drupal function.

in uc_store.admin.inc it builds the array, but ONLY if the store-administration menu item is in the core 'navigation' menu, and that menu is viewable by the current user. (Line 13) So if the Navigation menu is there, and link to admin/store will display the dashboard. Otherwise, it will not be displayed.

The workaround above works, but its kind of clunky to move everything around like that. It should just show on that page if the user has permission to administer the store.

Is there a better way to build the $tree array?

/**
* Display dashboard to other admin pages for the store.
*/
function uc_store_admin() {
  $tree = menu_navigation_links('navigation', 2);  // this builds the array of links for the dashboard, is tied // directly to the "navigation" menu

  if (($type = variable_get('uc_store_admin_page_display', 1)) == 4) {
    $main_menu = menu_get_item('admin/store');
    $content = system_admin_menu_block((array)$main_menu);

    $output = theme('admin_block_content', $content);
  }
  else {
    $output = theme('uc_admin_dashboard', $type, $tree);  // displays the dashboard, but if the tree is empty
                                                          // nothing is shown
  }
... method continues....

jeffsutt's picture
Offline
Joined: 03/25/2009
Juice: 19
yeh

ummm.... sorry had to delete last post, not related.

Try turning on all permissions for you retail user just to see if it makes any difference. Then turn them off one by one to isolate?:|

sphism's picture
Offline
Bug Finder
Joined: 11/29/2007
Juice: 215
Re: yeh

same here with ubercart 2.x-beta5 ithink

Have granted all uc permissions to a user but it makes no difference.

They get the status messages at the bottom but not the 'dashboard' at the top.

Does it rely on a random permission from elsewhere?

m

frosty's picture
Offline
Joined: 04/26/2009
Juice: 11
the missing permission
jeffsutt wrote:

ummm.... sorry had to delete last post, not related.

Try turning on all permissions for you retail user just to see if it makes any difference. Then turn them off one by one to isolate?:|

I found the permission that makes the difference -

under System module, it's

access administration pages