Closed (fixed)
Project:
Commerce Kickstart
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Dec 2012 at 13:54 UTC
Updated:
13 Jun 2013 at 14:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
candelas commentedthe same (they dont have permissions) happens with:
have nice holidays!
Comment #2
candelas commentedmore on the management menu.
i have applied diferent style to it. when i am as admin, i get the changes.
when i am as another role, the Products menu doesnt get the style. but only this one, the others get the changes.
in firebug i can see that the commerce kickstart menus it is applied after my theme in those items, but not in the rest.
the style
Comment #3
candelas commentedi resolved this adding this two rules to my custom style css. but still i dont understand why this is not needed in the admin role/user.
Comment #4
candelas commentedi keep studying why some menu items show if the user has not permission to them.
i hope this helps the maintainers to fix it.
sorry for my bad english :)
i centered in :
in commerce_kickstart_menus.module line 52 they are defined
admin/commerce/manage-products/settings has not a 'access callback', so it inherits from products (it has a view with: Access: Permission | Administer products) or gets the default on the cell if it is not given (i dont find documentation on this). i see in the database, table menu_router, cell acces_callback that settings has as acces_callback : user_access
my need is that one role can administer products, but not settings (variations and categories). so settings need a different callback, a new perm or access arguments.
then, categories and variations types have an access callback => TRUE what makes them accessible to all users that can see the management menu (translators and editors), what is wrong in my case. i think it should be
i also see in table: menu_links, cell: hidden (A flag for whether the link should be rendered in menus. (1 = a disabled menu item that may be shown on admin screens, -1 = a menu callback, 0 = a normal, visible link)) that the 3 of them has 0. i imagine that it is because it is not defined.
since i am not an expert programmer, i dont now if i should submit a patch (learning on that) or make my own solution (worst, since other people will have the same need).
i wonder if i should use in a custom module a function to change the visibility depending on the user... while you decide what to do...
i have learned a lot about menus :)
thanks for the module and i hope you have time to give advice to me :)
Comment #5
candelas commentedi solved temporally this problem with hook_menu_alter, since hook_menu_link_alter will change it for all roles. i put it here just in case someone can use it :)
but now the menus that are empty doesnt look well
now i have to go (31/dec), but, if i found a solution, i will put it here next days.
Comment #6
candelas commentedsolved by css. put in your custom theme:
so, my proposal is that the 'access callback' and 'access arguments' get changed, and the style too.
have a happy new year! :)
Comment #7
vasikei think the issue here it's the Menu items defined that use "drupal_goto()" function to redirect to other page, but haven't defined the access or the same "access".
Comment #8
jsacksick commentedComment #9
jsacksick commentedI merged the fix.