juliocamarero/liferay-portal — pull request #2382 by matethurzo (2013-08-28 13:37:37+00:00)
Title: LPS-38525

Hey Julio,

These are Eduardo's changes for the UI parts, but also my bugfix for the global scope to be able to turn on.

For my part the problem was if we tried to turn on the staging for global scope there was an error being thrown because the companyId, className, classPK fields are unique in the table. The global scope's values are for the className/classPK pair is the Company.class.getName, and the companyId itself. Now that's no good for the staging group. So the logic is now, if we are trying to add a staging group for the global scope we add with a group with a className Group.class.getName() and the global scope's group id thus linking the global scope staging group to the global scope itself besides the liveGroupId.

So I'm not sure if this is the best solution. It's probably one of the more easy ones, this logic seems to work properly, I was able to turn on and off the global scope staging with the staging group getting deleted after switching off the staging. This seemed easy enough to implement without breaking any other major functionality in the portal. Let me know what you think.

cc: @KocsisDaniel, @epgarcia