Changeset 27078 for main


Ignore:
Timestamp:
2013-03-13T14:16:12+13:00 (11 years ago)
Author:
sjm84
Message:

Creating a basic request now also adds in the user groups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r26537 r27078  
    792792        request.setAttribute(TO_ATT, to);
    793793        request.setAttribute(USER_ID_ATT, userContext._userID);
     794       
     795        if(userContext._groups != null)
     796        {
     797            String groupString = "";
     798            for(int i = 0; i < userContext._groups.length; i++)
     799            {
     800                groupString += userContext._groups[i];
     801                if(i != userContext._groups.length - 1)
     802                {
     803                    groupString += ",";
     804                }
     805            }
     806           
     807            if(groupString.length() > 0)
     808            {
     809                request.setAttribute(GROUPS_ATT, groupString);
     810            }
     811        }
    794812        return request;
    795813    }
Note: See TracChangeset for help on using the changeset viewer.