Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi Ryan et al,
Starting a test of Ubercart on D6.
Small issue with administration menu module.
http://drupal.org/project/admin_menu
The 'administer store' link doesn't appear in the bar.
Its a really popular module - very useful.
I've no idea why, and whether this is an issue for Ubercart or the other module.
[You drew the short straw so I'm reporting it here first :-) ]
Regards
Alan
Comment | File | Size | Author |
---|---|---|---|
#26 | 364307-store-admin-access.patch | 1.2 KB | longwave |
#9 | uc_store-menu_access.patch | 531 bytes | melon |
Comments
Comment #1
thill_ CreditAttribution: thill_ commentedI think this has been takencare of, but i have a quick fix for you, go yo site config -> admin menu and then click wipe and rebuild. Are you indeed running Beta 3 of Ubercart and the newest admin menu of 1.3?
Comment #2
rszrama CreditAttribution: rszrama commented+1 to wipe and rebuild.
Comment #3
alanburke CreditAttribution: alanburke commentedThanks! That did the trick.
Comment #5
jwilson3what about in d5 version, there seems to be no wipe and build function? I'm having the same problem.
Comment #6
rszrama CreditAttribution: rszrama commentedIn D5 just empty your cache tables... that should resolve it.
Comment #7
jwilson3Actually a cache clear (using devel/cache/clear) didnt fix it for me on D5. Any other suggestions?
Comment #8
rszrama CreditAttribution: rszrama commentedNot sure what to tell ya... make sure you're running the latest 5.x versions of Drupal/Ubercart/Administration menu. It works fine for me on 5.x. Might make sure the account you're trying to use has store permissions, too.
Comment #9
melon CreditAttribution: melon commentedSorry to bring this old issue again, but I faced the same problem, and I have a suggestion.
We recently updated one of our client's store from 5.x-1.7 to 6.x-2.0-rc6. Everything seems to work fine so far, however they use a role called 'storeop' with limited permissions. That role doesn't have the
administer store
permission but has theview all orders
,view customers
andedit orders
permissions to do the daily work on their store orders. Naturally, this role does not and should not have to access the actual store administration pages.On the 5.x version the admin_menu module played nicely, the role had the 'Store administration' menu item shown in the admin menu, while on 6.x it's not present.
Looking at the code of uc_store.module I found that the menu item 'admin/store' has the access callback of
'administer store'
. Changing this to'access administration pages'
solves the problem. I tested it: if a role doesn't have any other Ubercart related permissions than 'view all orders', but has access to 'access administration pages', the menu item shows up, and everything seems to work fine for me.I am proposing a tiny patch for this, please review. Thanks.
Comment #10
rszrama CreditAttribution: rszrama commentedNot a bad idea I think... so the idea is they'd be able to view admin/store, but only links they have access to would be visible from there. I don't think there's any sensitive material in the store status table we should have to worry about. Is the "administer store" permission used elsewhere?
Comment #11
melon CreditAttribution: melon commentedRyan, thanks for the quick response. Yep, the idea is to access admin/store with 'access administration pages', but for the actual access of further store admin pages would require additional permissions such as 'view all orders', 'administer store', 'configure taxes, etc. I think it's already working like that, I suppose only this menu access callback needs to be changed. However this clearly needs testing.
AFAIK the administer store permission is only used for configuring the store settings which is clearly not the task of a store operator.
Comment #12
rszrama CreditAttribution: rszrama commentedCommitted. Thanks, melon!
Comment #14
mogtofu CreditAttribution: mogtofu commentedHi,
Now that admin/store access is set to
access administration pages
i got an other problem, i need to set-up a store admin but not drupal admin, so it's helpfull for me to get independantadminister store
access.I use simplemenu for store admin witch is better than admin menu when you want to set-up a limited admin menu. And if there is no
administer store
permission, menu can't show up on normal menu.regards
Mog.
Comment #15
jday CreditAttribution: jday commentedmmm...neither wipe and rebuild nor clear all caches worked for me, store administration still missing...
Update:
I had to enable "access administration pages" under system module permissions, this must be new because I did not need that checked before (site administration and store administration handled by different people)
Comment #16
MBroberg CreditAttribution: MBroberg commentedSo once I give permission to 'access administration pages' how exactly do I limit users from having access to all of the site admin pages?
All I want is to allow my site owner to see view orders and store reports.
They do not need to be confused by or have access to all of the other menus that go with that permission.
I am a little confused by the permission system and how the menus interact - sorry. It seems to me that if a person has permission to view all orders, that menu item should be visible without having to grant unrelated permissions.
Without the 'access administration pages' permission they can access the order pages OK, just not see the links in the menu. Am I reduced to creating a new menu item for each page they can access?
Comment #17
mrbnet CreditAttribution: mrbnet commented+1 for this as well. Ever since the upgrade to 6.x I have to give store users access to administration pages for the whole Drupal site to get admin menus working properly.
Comment #18
neokrish CreditAttribution: neokrish commented+1. problems faced - http://drupal.org/node/803196
Comment #19
mrfelton CreditAttribution: mrfelton commentedPlease can we revert this so that the 'access administration pages' does not make the menu item appear. Currently, if a user has no Ubercart related permissions, they still see the Store Configuration menu item, but there is nothing in the page. This is very confusing for users. The menu item should not show unless the user has permissions to do anything in the store.
EDIT: Surely the 'administer store' permission should be the one that dictates if the top level menu item shows or not.
Comment #20
TR CreditAttribution: TR commentedI don't see the point in reverting this patch unless there's an alternative fix for the original issue. That would just be trading one bug for another, and doing it knowingly this time instead of inadvertently as was done in #12.
In the long run, it would help if the user community tested and reviewed patches in this queue. As it currently stands, the Ubercart maintainers have a choice of either 1) leaving issues open indefinitely until they get proper reviews, or 2) committing patches with minimal or no reviews, as was done in this issue, or 3) doing all the testing themselves, under a wide variety of conditions, in hopes of catching any problems. Thus, 2) has been the norm for this queue, with an occasional 3) thrown in for good measure. Options 1) and 2) both lead to griping and complaints from the user community, but 3) is unworkable because there is no way the maintainers can donate enough time to thoroughly test each patch with the thousands of use cases expected by the Ubercart community.
Comment #21
visualnotion CreditAttribution: visualnotion commentedI enabled the 'Access Administration pages' permission, but used the Site Configuration Permissions module.
If you enable it and just leave the granular settings blank in the user permissions, it will turn off access to administration pages while still showing the Store Administration menu item.
Comment #22
miaoulafrite CreditAttribution: miaoulafrite commentedsubscribing.
would be fine, if we could just go back to permission "Administer store" = access to page admin/store and not admin/store/*
Comment #23
BrightBoldIs there a way to make the menu show up if they have permissions for any of the children of the Administer Store menu? This may not be feasible, but if it were it would enable you to let people have a menu for viewing orders, reports, etc., without having to give them either Access Administration Pages or Administer Store permissions.
However, if I have to choose, in my case I'd rather give Administer Store permissions. In the meantime I'm going to try the solution in #21.
Comment #24
JayKayAu CreditAttribution: JayKayAu commentedThis issue is still outstanding for me as well. I'll give the solution in #21 a try, but I think this should really be a default thing.
Comment #25
AdamGerthel CreditAttribution: AdamGerthel commentedOne problem with #21 us that Site Configuration Permissions module doesn't support Features module well. It does have support for it, but it doesn't work.
Comment #26
longwavePatch that might fix this. After this is installed, you need one of the following permissions to be able to view "Store administration":
This works for me with admin_menu installed and any of the above permissions; the user does not need "access administration pages". Are there any other use cases not covered by the above permissions?
Comment #27
melon CreditAttribution: melon commentedAfter clearing the menu cache it works properly for me.
Thanks for the patch, Dave!
Comment #28
longwaveCommitted to 6.x.
Comment #29
longwaveCommitted to 7.x.