[Cosmo-dev] Groups via CMP in Cosmo

Vinubalaji Gopal vinu at osafoundation.org
Mon Dec 11 18:05:22 PST 2006


Hi all,
   I was implementing management of groups in Cosmo via CMP and got
stuck on how we could add members in a group. I first thought of adding
it this way (Part of a PUT request - PUT /group/everyone):

<group>
	<groupname>everyone</groupname>
	<created>2006-10-05T17:41:02-0700</created>
	<modified>2006-10-05T17:41:02-0700</modified>
	<url>http://localhost:8080/cmp/group/everyone</url>
	<members>
		<member>bcm</member>
		<member>vinu</member>
		<member>sprout</member>
		<member>rletness</member>
		<member>anothergroup</member>
	</members>
</group>

Then do we need to validate the members to see if they are present in
user or group? What do we do if a user and group have the same name?
To avoid such situations I thought of this structure.
	<members>
		<user>bcm</user>
		<group>anothergroup</group>
	</members>
If no one has any objection with this format, I will go ahead with the
implementation. 

Apart from that all the other operations will be performed similar to
the existing implementation. Like for getting all the groups, I will
have
GET /groups
For getting a particular group, I will have:
GET /group/groupname





More information about the cosmo-dev mailing list