November Happy Hour will be moved to Thursday December 5th.

Changing "Permissions for functions" programatically

Vote:
 
Hi,

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.

Thanks!

Zsolt

#230445
Edited, Nov 05, 2020 17:36
Vote:
 

Hi Zsolt

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

#230446
Nov 05, 2020 18:06
Vote:
 
Thanks Stefan!
#230471
Nov 06, 2020 8:52
Vote:
 

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

#230472
Nov 06, 2020 8:54
Vote:
 

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)

#230473
Nov 06, 2020 8:57
Vote:
 
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.
#230474
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.