hhuijser/liferay-portal — pull request #1916 by jonathanmccann (2014-05-29 18:45:32+00:00)
Title: LPS-46353

Hey Hugo,

The basic issue is that we were getting all of the user's userGroups and storing them in a hidden field making the HTML page size 30+ megabytes. With this fix, instead of adding and subtracting from that list on the JSP side, we just maintain a list of what the user has added/removed and pass that much smaller list to the backend.

I did some source formatting, but I still don't really like how it is laid out. Primarily the four for loops in the JSP and the public List getUserGroupRoles(PortletRequest portletRequest, boolean isAddUserGroupRole) method. I feel like those need to be reworked somehow but I'm not sure the best way to do it. In the case of the method, I think it might be better as private and do both the add/delete lists as once.

Let me know if you have any thoughts. Thanks.