The CreatorCon Call for Content is officially open! Get started here.

Delete orphan records from sys_user_has_role table

gee
Tera Guru

Hi Team,

I have an issue with deleting orphan records from sys_user_has_role table.

Tried with fix script to delete these records using GlideRecord, failed.

Delete button is disabled, even though schema level deletion is enable.

Also dried to deleted the user and imported the same user record using XML (user record export). Still role definitions are there!

Is there any method to delete these records from the above table?

Any suggestion please?

Platform is on Helsinki Patch 8.

Thanks & Regards,

Gee Abraham

1 ACCEPTED SOLUTION

gee
Tera Guru

Hi All,


This issue has been resolved by installing the following plugin.


Contextual Security: Role Management Enhancements (com.glide.role_management.inh_count)



Many thanks for your efforts to resolve this issue.



Best Regards,


Gee


View solution in original post

29 REPLIES 29

Hi All,


Also please note that currently there no group (membership) assignment for this user.



This is a domain separated environment. I think the issue is happened due to addition of groups and then removal. These groups have inherited role. May be when removing the assigned group the agent/user may not be in the correct domain, so orphan roles created /unable to remove roles completely!



Appreciate your suggestions and help to resolve the issue.



Also tried changing the domain to 'global' and used background script instead for Fix-script, same result, no progress.



Many thanks,


Gee


Hi Gee,



You are not seeing any roles in the Slush-bucket because these roles are inherited via Groups the user is a member of.


In your screenshot, I can see Groups as well. So, the roles that you are seeing in the Roles related list are inherited via these Groups.


Hi Nitish,



Roles are usually granted by groups only.


Then wouldn't that show up on the selected Roles slushbucket list?


Hi Rajshekhar,



If you grant roles via Groups then the Roles in the Related List are not shown in the Selected part of the slushbucket.


gee
Tera Guru

Hi All,


This issue has been resolved by installing the following plugin.


Contextual Security: Role Management Enhancements (com.glide.role_management.inh_count)



Many thanks for your efforts to resolve this issue.



Best Regards,


Gee