int[] ids = UIUtil.getIntParameters(request, "eperson_id");  if (ids != null)
int[] eperson_ids = UIUtil.getIntParameters(request, "eperson_id"); int[] group_ids = UIUtil.getIntParameters(request, "group_ids");  if (eperson_ids != null)
    private void processPermissions(Context context,            HttpServletRequest request, HttpServletResponse response,            Collection collection) throws SQLException, ServletException,            IOException, AuthorizeException    {        // Which permission are we dealing with?        int permission = UIUtil.getIntParameter(request, "permission");        // First, we deal with the special case of the MIT group...        if (UIUtil.getBoolParameter(request, "mitgroup"))        {            Group mitGroup = Group.findByName(context, "MIT Users");            int action;            if (permission == PERM_READ)            {                // assign default item and bitstream read to mitGroup                AuthorizeManager.addPolicy(context, collection,                        Constants.DEFAULT_ITEM_READ, mitGroup);                AuthorizeManager.addPolicy(context, collection,                        Constants.DEFAULT_BITSTREAM_READ, mitGroup);            }            else            {                // Must be submit                AuthorizeManager.addPolicy(context, collection, Constants.ADD,                        mitGroup);            }        }        //We need to add the selected people to the group.        // First, get the relevant group        Group g = null;        switch (permission)        {        case PERM_READ:            // Actually need to create a group for this.            g = Group.create(context);            // Name it according to our conventions            g                    .setName("COLLECTION_" + collection.getID()                            + "_DEFAULT_ITEM_READ");            // Give it the needed permission            AuthorizeManager.addPolicy(context, collection,                    Constants.DEFAULT_ITEM_READ, g);            AuthorizeManager.addPolicy(context, collection,                    Constants.DEFAULT_BITSTREAM_READ, g);            break;        case PERM_SUBMIT:            g = collection.getSubmitters();            break;        case PERM_WF1:            g = collection.getWorkflowGroup(1);            break;        case PERM_WF2:            g = collection.getWorkflowGroup(2);            break;        case PERM_WF3:            g = collection.getWorkflowGroup(3);            break;        case PERM_ADMIN:            g = collection.getAdministrators();            break;        }        // Add people from the form to the group        int[] ids = UIUtil.getIntParameters(request, "eperson_id");        if (ids != null)        {            for (int i = 0; i < ids.length; i++)            {                EPerson eperson = EPerson.find(context, ids[i]);                if (eperson != null)                {                    g.addMember(eperson);                }            }        }        // Update group        g.update();        showNextPage(context, request, response, collection, permission);        context.complete();    }