class HttpPermissionCheckerImpl implements PermissionChecker {

  @Override
  public boolean hasPermission(String user, String domain, String instance, String action)
      throws ServerException {
    try {
      return permissionsCache.get(new Key(user, domain, instance)).contains(action);
    } catch (Exception e) {
      throw new ServerException(e.getMessage(), e);
    }
  }

  @Inject public  HttpPermissionCheckerImpl(
      @Named("che.api") String apiEndpoint, HttpJsonRequestFactory requestFactory);

}