Preserve existing roles on the target instance for users with lower roles on the source instance

SteffenSchmidZH
Tera Contributor

Hello together

The following scenario: We have users with higher roles (admin) on lower instances (test, dev, sandbox) than on production. For example: Employee Max Mustermann has an "admin read" permission on our production and an "admin" permission on test.

After cloning, we are forced to manually reassign these users the higher roles on the cloning target instances.

Is it possible to exclude certain roles for certain users for a clone, so that the higher roles remain after cloning?

 

Thanks you & best regards
Steffen

2 ACCEPTED SOLUTIONS

Florian_R
Mega Sage

Hello,

You can add a preserver to your clone profile :
Clone definition > Preserve Data:
Table : sys_user_has_role or sys_group_has_role
Add some conditions.

Think about your configuration it will be different in your test and dev instance environment.
Oterh choice, you can create a filter from these tables and export XML in dev and test and reimport after.

View solution in original post

Christian_
Tera Guru

One should be careful when using data preservers to transfer large sets of data, such as user groups or role assignments. However, if you must preserve table data, like users, groups, and roles, consider exporting the records to a file and importing them after cloning.
Alternatively, if you have a smaller subset of users in your sub-production instances, you can exclude these tables from the production environment and preserve your existing users. However, this depends somewhat on the structure of the other data you are bringing down.

Data preservation on cloning target instances 
Exclude a table from cloning

View solution in original post

2 REPLIES 2

Florian_R
Mega Sage

Hello,

You can add a preserver to your clone profile :
Clone definition > Preserve Data:
Table : sys_user_has_role or sys_group_has_role
Add some conditions.

Think about your configuration it will be different in your test and dev instance environment.
Oterh choice, you can create a filter from these tables and export XML in dev and test and reimport after.

Christian_
Tera Guru

One should be careful when using data preservers to transfer large sets of data, such as user groups or role assignments. However, if you must preserve table data, like users, groups, and roles, consider exporting the records to a file and importing them after cloning.
Alternatively, if you have a smaller subset of users in your sub-production instances, you can exclude these tables from the production environment and preserve your existing users. However, this depends somewhat on the structure of the other data you are bringing down.

Data preservation on cloning target instances 
Exclude a table from cloning