You can add queries to the addon.xml file to insert the new privilege in the privileges table. That will be the easiest thing to do.
I believe privileges are only applied to Administrator groups.
It's unclear whether you are talking about customer usergroups or admin usergroups (I thought you were asking about customer usergroups). The two above responses apply to admin usergroups. But if you want customer, then you will probably have to do as I suggested.
This is why it's hard to give specific answers. CSC is very flexible and some things apply in customer/admin only while others apply to both. Also details of what the addon is supposed to do are important. And there's always more than one way to skin a cat.....
Okay, my confusion. The tags to add to your addon xml would then be:
INSERT INTO ?:privileges (privilege, is_default, section_id) VALUES (‘manage_[YOUR_ADDON_NAME]’, ‘Y’, ‘addons’)
DELETE FROM ?:privileges WHERE privilege='manage_[YOUR_ADDON_NAME]'
These addition to the addon.xml file should be done before installing the addon, correct? I mean if the addon is already installed the new entries to the privileges table will not be done.?
These addition to the addon.xml file should be done before installing the addon, correct? I mean if the addon is already installed the new entries to the privileges table will not be done.?
Right, you should add these queries and re-install the module. Do not forget that if the development mode is off, addon templates will be deleted from the active theme
REPLACE INTO ?:privileges (privilege, is_default, section_id) VALUES ('manage_[addon_id_name]', 'Y', 'addons');
DELETE FROM ?:privileges WHERE privilege LIKE ‘manage_[addon_id_name]’
OR
REPLACE INTO ?:privileges (privilege, is_default, section_id) VALUES ('[addon_id_name]', 'Y', 'addons');
DELETE FROM ?:privileges WHERE privilege IN ('[addon_id_name]');
The first one does not have (for="install"); and the second does not have (editions="MULTIVENDOR,ULTIMATE"). Also the second one does not have (manage_[addon_id_name])