static boolean isUserInRole(Description _roleName)
{
boolean res;
SecurityUserRole securityUserRole;
SecurityRole securityRole;
;
select RecId from securityUserRole
where securityUserRole.User == curUserId()
join RecId from securityRole
where securityRole.RecId == securityUserRole.SecurityRole
&& ( securityRole.AotName == _roleName
) ;
if (securityUserRole.RecId)
{
res = true;
}
return res;
}
====================================================================
ListEnumerator userRolesEnumerator;
userManagement = new SysUserManagement();
userRoles = userManagement.getRolesForUser(curUserId());
userRolesEnumerator = userRoles.getEnumerator();
Global::IsSystemadministrator()
GLobal::FinancialController()