[Cosmo-dev] Re: [commits-sandbox] [sandbox] (vinu) [1343] Not
so well tested,
but a complete feature for addition of members to a group using
Vinubalaji Gopal
vinu at osafoundation.org
Tue Dec 19 12:57:55 PST 2006
On Thu, 2006-12-14 at 16:42 -0800, Brian Moseley wrote:
> see, yea, when you find yourself needing to pass services to a
> resource, you know you've made a bad design choice :)
>
Agreed I thought about that and then I could not think of a better
solution. Your solution moves away from the XML based manipulation and
you are suggesting that we do the validation checks in CmpServlet
itself; throwing an error in case the group or member is already
present. I don't see a way to change the groupname using this approach.
So here is my understanding of how things should work (including my own
thoughts/questions):
A new group is created using:
PUT /cmp/group/<newgroupname>
It may optionally include some members like
PUT /cmp/group/<newgroupname>
user=foo&group=bar
We will throw an error in case the newgroupname is already present. This
check will be done in CmpServlet itself.
POST is similar but it assumes that the groupname is already present
Example:
POST /cmp/group/<existinggroupname>
user=foo&group=bar
Should I throw an error in case /cmp/group/<existinggroupname> does not
exist?
a GET /cmp/groups/ will return all the groups including all the group
information as shown below.
a GET /cmp/group/groupname will return all the information about the
group, similar to a GET /cmp/user/username - but for groups we will
include all the member information. Example:
<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>
<user>bcm</user>
<group>anothergroup</group>
</members>
</group>
a GET /group/groupname/user/user1 will check if the user is part of the
group.
More information about the cosmo-dev
mailing list