1 package org.sonar.server.usergroups.ws;
3 import org.sonar.server.exceptions.BadRequestException;
4 import org.sonar.server.management.ManagedInstanceService;
6 public class ManagedInstanceChecker {
8 private final ManagedInstanceService managedInstanceService;
10 public ManagedInstanceChecker(ManagedInstanceService managedInstanceService) {
11 this.managedInstanceService = managedInstanceService;
14 public void checkInstanceIsNotExternallyManaged() {
15 BadRequestException.checkRequest(!managedInstanceService.isInstanceExternallyManaged(), "Operation not allowed when instance is externally managed.");