1) I think you'll have to make a DB query for this, and check if you find any group objects with the given name. I'm not 100% on this though. 2) I believe this should be done by adding a 'POST' method to the 'ReviewGroupUserResource' (http://www.reviewboard.org/docs/manual/dev/webapi/2.0/resources/review-group-user-list/#webapi2.0-review-group-user-list-resource). The post request will contain the user-id (or maybe the username) to be added to the group. For an example of a resource with a method like this check out the 'create()' method in 'ReviewDiffCommentResource'. 3) This is done in the 'update()' method of the resource. Check out 'ReviewDiffCommentResource' for an example. 4) While investigating this I was coming across some issues. I'm not sure what you should be doing.
I don't beleive this is ever used since no other resources define it. It looks like what you want is 'has_modify_permissions', according to the WebAPIResource docstring in Djblets. "has_modify_permissions - Used for HTTP POST or PUT calls, if called by the subclass. Returns False by default." Your new 'has_modify_permissions' method should take a group, and check if the user can modify it. Look at the other resources for examples of this.
You could probably treat this like 'ReviewRequestDraftResource' does. If the group already exists, just treat as an update, not a create.
Add group create/modify to webapi.
Review Request #3217 — Created July 13, 2012 and discarded
This isn't ready, I'm just posting the RB to get some pointers. Issues: 1) How to check if group already exists 2) How to add users to new group 3) How to update group 4) How to update users in group
1) If you can point out how "to make a DB query for this" that would be helpful. Where is the database's schema? I've been having to use `dir()` to inspect the objects because I can't find a quick way to understand reviewboard's internals. =X 2) If I understand correctly, I need to add a create() method to ReviewGroupUserListResource (and is related to ReviewGroupResource, right?). However, I don't see a similar class for ReviewGroupUserListResource... e.g., there is no ReviewGroupResource...? Why not? Again, the schema might be helpful. 3) Right. I think once I understand how "to make DB quer(ies)" that this will be easier. 4) Still confused, too. =)