how to get list of user access with roles and entity access?
select
b.ENABLE, b.id, b.NETWORKALIAS, c.AOTNAME, e.DATAAREA
from SECURITYUSERROLE a
inner join USERINFO b
on a.USER_=b.ID
inner join SECURITYROLE c
on c.RECID=a.SECURITYROLE
left join OMUSERROLEORGANIZATION d
on d.SECURITYROLE=a.SECURITYROLE
and d.USER_=b.ID
left join COMPANYINFO e
on e.RECID=d.OMINTERNALORGANIZATION
where
1=1
and b.ENABLE=1
and a.ASSIGNMENTSTATUS=1
this query will show you all user access and roles, if the dataarea is null then that user can access to all entity