Extension to CS-Cart and Multi-Vendor allows creating access rules to store RESTAPI. In standard, access to RESTAPI is regulated separately for each user group. Added rules allow to block (or give) access only to selected administrator, only for chosen API object (ex. Products, Orders) only with selected API method (ex. GET, PUT).
We start from installing an extension:
Managing RESTAPI rules menu is in tab Customers:
List contains all information about defined rules. New rules can be added with + button in upper right corner:
When adding rules, we have to define those parameters:
- Name: makes rule different from others, serves only informational purpose.
- Administrator: which administrator is affected by the rule.
- Method: GET means reading data, POST modifying it, PUT adding new data (ex. orders or products), and DELETE deleting data.
- Entity: Object, for which rule applies. Full list of objects and their specification is available here.
- Access status: should the rule block access to part of the RESTAPI, or give it.
Add-on overrides standard RESTAPI rules, which are defined in usergroup settings. Here, administrators by default cannot access products and have full access to orders.
Because we created rule that blocks Orders object for administrator firstname.lastname@example.org, trying to download orders gives him a notification:
Administrator can download information about products, even though they are blocked in user group - because we created record that gives administrator access to Products object.
Add-on amplifies store security, letting you set precise RESTAPI access range for each administrator.
We invite you to shopping!
Good to know
Order by phone
tel: +48 661 661 964
tel: +48 698 780 870
all over the world
Installation in 24 hours