Reputation: 11
We are trying to synchronise user rights from user group(s) across all environments. These rights can be exported just fine, but reimporting them on other environments is giving us some trouble. By importing user rights via a .csv file in the Hybris administration console, all of the rights defined in the .csv are simply appended to the existing rights (or overwritten for matching rights). But what we want to achieve is removal of the user rights that are not part of the exported user rights from the source environment.
We tried reimporting the .csv, tried running a groovy script and using the PermissionManagementService to no avail and also tried removing the rights via the Backoffice, which works, but it is not a viable option. We are talking about 6 environments per country, several user groups with several rights. This would take hours, if not days to clean out.
So how should we go about removing pre-existing user rights?
Upvotes: 1
Views: 134
Reputation: 1
There isn't any way to do this using Impex. And it is too risky to change the database for this.
I can only think of two solutions:
Depending in your user right concept, you should have a list of item types whose read or write or delete rights are different depending on the user groups. For example, Store, Address, Customer, Fields of the customers, Product, sub-classes of products, etc.
Although the second one is the most complex solution, it is a good practice and will prevent many bugs in production.
Upvotes: 0