We wanted to add permissions for the addon which donot need to be available for a non admin user but dont have the permission built in the addon.
I figured out the part that we need to do 2 things :
Add 2 row in privileges table for the same or add it in the addon.xml and reinstall the addon
REPLACE INTO ?:privileges (privilege, is_default, section_id) VALUES ('manage_addon_name', 'Y', 'addons')
DELETE FROM ?:privileges WHERE privilege LIKE 'manage_addon_name'
I am now able to see the Addon name in the Privileges Page but it has no effect if I dont provide the permission to a certain user group , the users are still able to see the addon menu item.
You should also add a row to the 'usergroup_privileges' table for usergroup 4
REPLACE INTO ?:usergroup_privileges (usergroup_id, privilege) VALUES (4, 'manage_addon_name')
As for the 'schema', you can apply a permission only for controller/mode. So you should not use this:
$schema['addon_name']
You should use the following:
$schema['controller_name']
I did these changes but still the menu shows for that addon , when i click on the menu options it gives 403 access denied but i want the menu option to not be displayed.
I have one problems. I assign permissions to display orders and products page in sub admins but some custom addons also displaying. how to create permissions in custom addons and pages.
I have one problems. I assign permissions to display orders and products page in sub admins but some custom addons also displaying. how to create permissions in custom addons and pages.
Can someone kindly provide a little bit more detail on how to create/add permission for add-ons? I was trying to enable Google Export & Data Feeds on a selected group.
I don't want to enable "view_catalog" & "manage_catalog" permission. Please advise.
I think the documentation (is there any?!) around configuring permission in CS-CART could also be improved or written. It is very useful to have this feature in built, but not so useful when trying to decipher how to define your own schema.