use of org.sonar.server.permission.ProjectId in project sonarqube by SonarSource.
the class RemoveGroupAction method handle.
@Override
public void handle(Request request, Response response) throws Exception {
try (DbSession dbSession = dbClient.openSession(false)) {
GroupIdOrAnyone group = support.findGroup(dbSession, request);
Optional<ProjectId> projectId = support.findProjectId(dbSession, request);
checkProjectAdmin(userSession, group.getOrganizationUuid(), projectId);
PermissionChange change = new GroupPermissionChange(PermissionChange.Operation.REMOVE, request.mandatoryParam(PARAM_PERMISSION), projectId.orElse(null), group);
permissionUpdater.apply(dbSession, asList(change));
}
response.noContent();
}
Aggregations