static void SecurityByRole(Args _args)
{
SecurityRole securityRole;
SecurityUserRole UserRole;
SysUserInfo userInfo;
OMUserRoleOrganization roleOrganization;
OMInternalOrganization internalOrganization;
while select ID from userInfo
order by id asc
outer join UserRole
where UserRole.User == userInfo.Id
outer join securityRole
where securityRole.RecId == UserRole.SecurityRole
outer join roleOrganization
where roleOrganization.User == userInfo.Id
&& roleOrganization.SecurityRole == UserRole.SecurityRole
outer join internalOrganization
where internalOrganization.RecId == roleOrganization.OMInternalOrganization
{
print userInfo.Id, userInfo.Email, SysLabel::labelId2String(securityRole.Name), internalOrganization.Name ? internalOrganization.Name : "All Company";
// pause;
}
pause;
}
{
SecurityRole securityRole;
SecurityUserRole UserRole;
SysUserInfo userInfo;
OMUserRoleOrganization roleOrganization;
OMInternalOrganization internalOrganization;
while select ID from userInfo
order by id asc
outer join UserRole
where UserRole.User == userInfo.Id
outer join securityRole
where securityRole.RecId == UserRole.SecurityRole
outer join roleOrganization
where roleOrganization.User == userInfo.Id
&& roleOrganization.SecurityRole == UserRole.SecurityRole
outer join internalOrganization
where internalOrganization.RecId == roleOrganization.OMInternalOrganization
{
print userInfo.Id, userInfo.Email, SysLabel::labelId2String(securityRole.Name), internalOrganization.Name ? internalOrganization.Name : "All Company";
// pause;
}
pause;
}
No comments:
Post a Comment