Browse Source

Only copy app objects for enabled plan apps. Add TlsPassthru app to all plans. Add confirm password error messages.

tags/v0.9.12
Jonathan Cobb 4 years ago
parent
commit
1684713dd9
4 changed files with 20 additions and 5 deletions
  1. +11
    -1
      bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java
  2. +2
    -0
      bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties
  3. +6
    -3
      bubble-server/src/main/resources/models/defaults/bubblePlan.json
  4. +1
    -1
      bubble-web

+ 11
- 1
bubble-server/src/main/java/bubble/service/dbfilter/EntityIterator.java View File

@@ -9,6 +9,7 @@ import bubble.cloud.storage.local.LocalStorageConfig;
import bubble.cloud.storage.local.LocalStorageDriver; import bubble.cloud.storage.local.LocalStorageDriver;
import bubble.model.account.AccountSshKey; import bubble.model.account.AccountSshKey;
import bubble.model.account.AccountTemplate; import bubble.model.account.AccountTemplate;
import bubble.model.app.AppTemplateEntity;
import bubble.model.app.BubbleApp; import bubble.model.app.BubbleApp;
import bubble.model.bill.AccountPaymentMethod; import bubble.model.bill.AccountPaymentMethod;
import bubble.model.bill.BubblePlanApp; import bubble.model.bill.BubblePlanApp;
@@ -160,12 +161,21 @@ public abstract class EntityIterator implements Iterator<Identifiable> {
log.info("addEntities: system BubblePlanApp " + systemPlanApp.getUuid() + ": no matching BubbleApp not found in userApps (not adding): " + names(userApps)); log.info("addEntities: system BubblePlanApp " + systemPlanApp.getUuid() + ": no matching BubbleApp not found in userApps (not adding): " + names(userApps));
} else { } else {
// systemPlanApp will now be associated with "root"'s BubblePlan, but user's BubbleApp // systemPlanApp will now be associated with "root"'s BubblePlan, but user's BubbleApp
log.info("addEntities: rewrote app for "+systemPlanApp.getUuid()+" -> "+userApp.getName()+"/"+userApp.getUuid());
log.info("addEntities: rewrote app for " + systemPlanApp.getUuid() + " -> " + userApp.getName() + "/" + userApp.getUuid());
add(systemPlanApp.setApp(userApp.getUuid())); add(systemPlanApp.setApp(userApp.getUuid()));
} }
} }
} }


} else if (!fullCopy && planApps != null && AppTemplateEntity.class.isAssignableFrom(c)) {
// Only copy app-related objects if the corresponding app is among the planApps
// Make copied objects templates
for (AppTemplateEntity e : (List<? extends AppTemplateEntity>) entities) {
if (planAppEnabled(e.getApp(), planApps)) {
add(e.setTemplate(true));
}
}

} else if (!fullCopy && planApps != null && AccountTemplate.class.isAssignableFrom(c)) { } else if (!fullCopy && planApps != null && AccountTemplate.class.isAssignableFrom(c)) {
// only copy app-related entities for enabled apps, make them all templates // only copy app-related entities for enabled apps, make them all templates
entities.stream() entities.stream()


+ 2
- 0
bubble-server/src/main/resources/message_templates/en_US/server/pre_auth/ResourceMessages.properties View File

@@ -171,6 +171,7 @@ err.name.planMaxAccountLimit=No more accounts can be created on this plan. Upgra
err.password.required=Password is required err.password.required=Password is required
err.password.tooShort=Password must be at least 8 characters err.password.tooShort=Password must be at least 8 characters
err.password.invalid=Password must contain at least one letter, one number, and one special character err.password.invalid=Password must contain at least one letter, one number, and one special character
err.confirmPassword.mismatch=Password does not match
err.account.suspended=Account is suspended err.account.suspended=Account is suspended
err.account.locked=Account is locked err.account.locked=Account is locked
err.account.noParent=No parent account found err.account.noParent=No parent account found
@@ -253,6 +254,7 @@ err.storage.unknownError=Error connecting to Storage service
form_title_login=Login form_title_login=Login
field_label_username=Username field_label_username=Username
field_label_password=Password field_label_password=Password
field_label_confirm_password=Confirm Password
field_label_unlock_key=Unlock Key field_label_unlock_key=Unlock Key
form_title_register=Register form_title_register=Register
field_label_contactType=Contact Type field_label_contactType=Contact Type


+ 6
- 3
bubble-server/src/main/resources/models/defaults/bubblePlan.json View File

@@ -15,7 +15,8 @@
"BubblePlanApp": [ "BubblePlanApp": [
{"app": "TrafficAnalytics"}, {"app": "TrafficAnalytics"},
{"app": "BubbleBlock"}, {"app": "BubbleBlock"},
{"app": "UserBlocker"}
{"app": "UserBlocker"},
{"app": "TlsPassthru"}
] ]
} }
}, },
@@ -36,7 +37,8 @@
"BubblePlanApp": [ "BubblePlanApp": [
{"app": "TrafficAnalytics"}, {"app": "TrafficAnalytics"},
{"app": "BubbleBlock"}, {"app": "BubbleBlock"},
{"app": "UserBlocker"}
{"app": "UserBlocker"},
{"app": "TlsPassthru"}
] ]
} }
}, },
@@ -57,7 +59,8 @@
"BubblePlanApp": [ "BubblePlanApp": [
{"app": "TrafficAnalytics"}, {"app": "TrafficAnalytics"},
{"app": "BubbleBlock"}, {"app": "BubbleBlock"},
{"app": "UserBlocker"}
{"app": "UserBlocker"},
{"app": "TlsPassthru"}
] ]
} }
} }


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 8472c77a2eedf2c3be56fa9dc103d4f3a454a6dc
Subproject commit 70da8e0d38be1ea90edc33784e94a8d5435f8ac5

Loading…
Cancel
Save