}
public List getAllowedDomains(String loginName)
{
UserManager um = null;
GroupManager gm = null;
ArrayList returnList = new ArrayList();
try
{
um = (UserManager) getService(UserManager.ROLE, svcConfig.getHint(UserManager.ROLE));
gm = (GroupManager) getService(GroupManager.ROLE, svcConfig.getHint(GroupManager.ROLE));
User u = um.find(User.Property.NAME, loginName);
Configuration[] domains = configuration.getChildren("domain");
for (int i = 0; i < domains.length; i++)
{
Configuration oneDomain = domains[i];
Configuration[] groups = oneDomain.getChildren("group");
String oneGroupName = null;
for (int j = 0; j < groups.length; j++)
{
oneGroupName = groups[j].getValue();
Group[] usersGroups = gm.listGroups(u);
for (int k = 0; k < usersGroups.length; k++)
{
if (usersGroups[k].get(Group.Property.NAME).equals(oneGroupName))
{