Issue in target instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 06:55 AM
Hi,
In production, the role 'u_aqcc_read' is having 3 members like: A,B,C, so they can have access ready only. In test, the same users A,B,C is having access to edit or write.
So when we clone from prod to test the role 'u_aqcc_read' is adding to users A,B,C in test, hence they are loosing the edit or write access.
So I want to clean the role 'u_aqcc_read' from users in test by using Cleanup scripts after post clone. How to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 04:26 PM
If the group has multiple roles a better approach might be to remove the role from the group.
sys_group_has_role, maybe something like this
var grm = new GlideRecord('sys_group_has_role');
grm.addQuery('group', 'group_sys_id');
grm.addQuery('role', 'role_sys_id');
grm.query();
if(grm.next()) {
grm.deleteRecord();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 02:44 PM
Also, I should not touch users who is having the read only role. only identify the users to whome the ready only role added during cloning and delete those users only, not all the users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 10:52 PM
Why not use data preservers and table excludes? If you exclude your sys_user_has_role, sys_group_has_role, sys_user_grmember tables and preserve the data, you won't have any issues (assuming your users have the same sys_id's on the instances).
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark