Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jorge Ferrer
Upcoming changes in the support for associating user groups to organization
June 13, 2011 11:17 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2756

Join Date: August 31, 2006

Recent Posts

Hey guys,

I'm writing this post to get some feedback about a change that we are planning to make for 6.1 that is part of the improvements we are doing to simplify the use of organizations and sites (previously known as communities).

In 6.0 (and 5.2EE) we added the ability to associate a user group to an organization. This was done because some people were using organizations to create sites and wanted an easy way to associate certain types of users to several sites at once and since the "site" of an organization was hidden the UI presented this ability as a way to associate the user group to the organization. It is worth mentioning that while organization administrators can manage the user accounts of users that belong to it directly, they cannot do the same for the users that belong to it through a user group. This was a hidden secret that fortunately wasn't a big issue because that's what most people using this wanted anyway.

For 6.1, we are making a lot of improvements to the management of memberships of a site, and this time a site includes those that are independent as well as those that belong to organizations. Because of this, there is no longer a need to have in the UI to administer organizations a way to associate a user group to the organization itself. Also it is clear that the user group is a member of the site and not that all users of the user group now belong to the organization and can be managed by the organization administrators.

I know it's confusing and that's exactly why I want to make sure it's simplified for 6.1. There is only one change pending and that's the reason for this post. It's the API method user.getOrganizations(). Previously it also returned those organizations to which the user "belonged" through a user group. But that is misleading because there is a huge difference in belonging in one way or another. Since there is another method called user.getGroups() that already returns all groups to which the user belongs either explicitly or through a user group, my proposal is to remove the indirect associations from the result of the user.getOrganizations() method.

Does anyone have anything against this change?
Tarkan Corak
RE: Upcoming changes in the support for associating user groups to organiza
June 17, 2011 6:39 AM
Answer

Tarkan Corak

Rank: Regular Member

Posts: 130

Join Date: October 7, 2008

Recent Posts

Hi Jorge,

I can imagine that someone really wants to get all associated organizations, including indirect associations. AFAIK "User.getGroups()" would always return a full list, and you have to iterate through the result and check whether the group is of type organization.

Here comes just one proposal:

- Change the already existing method to "User.getOrganizations(boolean includeIndirectAssociations)" and check for the boolean flag.
- Create a new method (as you mentioned) "User.getOrganizations()" with one line of code: "return getOrganizations(false)"

Tarkan
Jorge Ferrer
RE: Upcoming changes in the support for associating user groups to organiza
June 17, 2011 7:34 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2756

Join Date: August 31, 2006

Recent Posts

Hi Tarkan,

Thanks for your answer.

My concern with that solution is that it is not really true that a user group is associated to the organization, but the the Group (Site) underlying the organization. What this means is that being part of that group doesn't make the member a user of the organization under the same terms than if the user belonged to the organization directly.

This was all pretty hidden, but now that the Site of an organization is visible, the problem also becomes visible. So my proposal is this:
  1. Allow associating user groups to sites (even if the site belongs to an organization): this is exactly the real functionality that has always existed even for organizations although the UI made it appear as if the user group really belonged to the organization.
  2. The method getOrganizations() will return the organizations to which the user belongs (which I think should be one in most cases).
  3. A method called getSites() or maybe getGroups() returns all the sites that a user belongs to either directly or through a user group (based on a boolean parameter value) and regardless of whether the site belongs to an organization or not.