if (!gitblit.deleteUser(model.username)) {
response.setStatus(failureCode);
}
} else if (RpcRequest.CREATE_TEAM.equals(reqType)) {
// create team
TeamModel model = deserialize(request, response, TeamModel.class);
try {
gitblit.addTeam(model);
} catch (GitBlitException e) {
response.setStatus(failureCode);
}
} else if (RpcRequest.EDIT_TEAM.equals(reqType)) {
// edit team
TeamModel model = deserialize(request, response, TeamModel.class);
// name parameter specifies original team name in event of rename
String teamname = objectName;
if (teamname == null) {
teamname = model.name;
}
try {
gitblit.reviseTeam(teamname, model);
} catch (GitBlitException e) {
response.setStatus(failureCode);
}
} else if (RpcRequest.DELETE_TEAM.equals(reqType)) {
// delete team
TeamModel model = deserialize(request, response, TeamModel.class);
if (!gitblit.deleteTeam(model.name)) {
response.setStatus(failureCode);
}
} else if (RpcRequest.LIST_REPOSITORY_MEMBERS.equals(reqType)) {
// get repository members