Try our conversational search powered by Generative AI!

Changing "Permissions for functions" programatically


It is possible to change the settings in Admin / Config / Permissions for Functions part of the UI programatically, could someone point me out some APIs?

Using CMS 11.10.



Edited, Nov 05, 2020 17:36

Hi Zsolt

Have a look at using the PermissionRepository and PermissionTypeRepository classes. Be aware that they are internal and not well-documented.

Nov 05, 2020 18:06
Thanks Stefan!
Nov 06, 2020 8:52

Just curious: do you need this to manage built-in or custom permissions?

Nov 06, 2020 8:54

Small correction: both are not a internal type, and you can use them as you like. Documentation can always be better but I think the default is fairly adequate because the classes are simple and self explanatory

Most predefined permisions can be accessed via CatalogPermissions and OrdersPermissions classes (yes they are Commerce)

Nov 06, 2020 8:57
We need this for built-in permissions, we need to provide a "simpler" way to configure these to match the new permission model of the customer.
Nov 06, 2020 9:07
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.