ソースを参照

fix default footprint lookup, find account footprint

tags/v0.17.2
Jonathan Cobb 4年前
コミット
72719ed931
5個のファイルの変更15行の追加3行の削除
  1. +5
    -0
      bubble-server/src/main/java/bubble/dao/account/AccountOwnedEntityDAO.java
  2. +3
    -0
      bubble-server/src/main/java/bubble/dao/account/TrustedClientDAO.java
  3. +6
    -1
      bubble-server/src/main/java/bubble/resources/bill/AccountPlansResource.java
  4. +0
    -1
      bubble-server/src/main/java/bubble/service/cloud/GeoService.java
  5. +1
    -1
      bubble-server/src/main/resources/messages

+ 5
- 0
bubble-server/src/main/java/bubble/dao/account/AccountOwnedEntityDAO.java ファイルの表示

@@ -64,6 +64,11 @@ public abstract class AccountOwnedEntityDAO<E extends HasAccount>
return found != null ? found : findByAccountAndId(account.getParent(), id);
}

public E findByAccountAndNameAndParentId(Account account, String id) {
final E found = findByAccountAndId(account.getParent(), id);
return found == null ? null : findByAccountAndId(account.getUuid(), found.getName());
}

public File getFile(String cloudServiceUuid, String key) {
final String sha = sha256_hex(key);
final String pathMiddle;


+ 3
- 0
bubble-server/src/main/java/bubble/dao/account/TrustedClientDAO.java ファイルの表示

@@ -6,6 +6,7 @@ package bubble.dao.account;

import bubble.model.account.TrustedClient;
import lombok.extern.slf4j.Slf4j;
import org.cobbzilla.wizard.model.Identifiable;
import org.springframework.stereotype.Repository;

import static java.util.UUID.randomUUID;
@@ -13,6 +14,8 @@ import static java.util.UUID.randomUUID;
@Repository @Slf4j
public class TrustedClientDAO extends AccountOwnedEntityDAO<TrustedClient> {

@Override protected String getNameField() { return Identifiable.UUID; }

@Override public Object preCreate(TrustedClient trusted) {
return super.preCreate(trusted.setTrustId(randomUUID().toString()));
}


+ 6
- 1
bubble-server/src/main/java/bubble/resources/bill/AccountPlansResource.java ファイルの表示

@@ -214,7 +214,12 @@ public class AccountPlansResource extends AccountOwnedResource<AccountPlan, Acco
}
} else {
log.warn("setReferences: footprint not set, using default");
request.setFootprint(configuration.getThisNetwork().getFootprint());
final BubbleFootprint footprint = footprintDAO.findByAccountAndNameAndParentId(caller, configuration.getThisNetwork().getFootprint());
if (footprint == null) {
errors.addViolation("err.footprint.defaultNotFound");
} else {
request.setFootprint(footprint.getUuid());
}
}

AccountPaymentMethod paymentMethod = null;


+ 0
- 1
bubble-server/src/main/java/bubble/service/cloud/GeoService.java ファイルの表示

@@ -245,7 +245,6 @@ public class GeoService {
final double latitude = geo.getLatitude();
final double longitude = geo.getLongitude();
return getCloudRegionRelatives(network, latitude, longitude, exclude);

}

public List<CloudRegionRelative> getCloudRegionRelatives(BubbleNetwork network,


+ 1
- 1
bubble-server/src/main/resources/messages

@@ -1 +1 @@
Subproject commit fefb38ea11b3a1020474418e045cec997bed9510
Subproject commit f2f003c914bedd55485a5f27132d86c62477bd5a

読み込み中…
キャンセル
保存