@@ -171,6 +171,14 @@ public class AccountDAO extends AbstractCRUDDAO<Account> implements SqlViewSearc | |||||
final CloudServiceDriver driver = parentEntity.getDriver(); | final CloudServiceDriver driver = parentEntity.getDriver(); | ||||
if (driver.disableDelegation()) { | if (driver.disableDelegation()) { | ||||
return accountEntity.setTemplate(false); | return accountEntity.setTemplate(false); | ||||
} else if (selfNodeService.getThisNetwork() != null && selfNodeService.getThisNetwork().getInstallType() == AnsibleInstallType.node) { | |||||
// on a node, sub-accounts can use the same cloud/config/credentials as their admin | |||||
return accountEntity.setDelegated(parentEntity.getDelegated()) | |||||
.setCredentialsJson(parentEntity.getCredentialsJson()) | |||||
.setDriverConfigJson(parentEntity.getDriverConfigJson()) | |||||
.setTemplate(false); | |||||
} else { | } else { | ||||
return accountEntity.setDelegated(parentEntity.getUuid()) | return accountEntity.setDelegated(parentEntity.getUuid()) | ||||
.setCredentials(CloudCredentials.delegate(configuration.getThisNode(), configuration)) | .setCredentials(CloudCredentials.delegate(configuration.getThisNode(), configuration)) | ||||
@@ -7,6 +7,7 @@ import bubble.client.BubbleApiClient; | |||||
import bubble.cloud.CloudServiceDriver; | import bubble.cloud.CloudServiceDriver; | ||||
import bubble.dao.account.AccountDAO; | import bubble.dao.account.AccountDAO; | ||||
import bubble.dao.cloud.CloudServiceDAO; | import bubble.dao.cloud.CloudServiceDAO; | ||||
import bubble.model.cloud.AnsibleInstallType; | |||||
import bubble.model.cloud.BubbleNetwork; | import bubble.model.cloud.BubbleNetwork; | ||||
import bubble.model.cloud.BubbleNode; | import bubble.model.cloud.BubbleNode; | ||||
import bubble.server.listener.BubbleFirstTimeListener; | import bubble.server.listener.BubbleFirstTimeListener; | ||||
@@ -70,6 +71,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration | |||||
public static final File DEBUG_NODE_INSTALL_FILE = new File(HOME_DIR, ".debug_node_install"); | public static final File DEBUG_NODE_INSTALL_FILE = new File(HOME_DIR, ".debug_node_install"); | ||||
public static final String TAG_SAGE_LAUNCHER = "sageLauncher"; | public static final String TAG_SAGE_LAUNCHER = "sageLauncher"; | ||||
public static final String TAG_BUBBLE_NODE = "bubbleNode"; | |||||
public static final String TAG_NETWORK_UUID = "networkUuid"; | public static final String TAG_NETWORK_UUID = "networkUuid"; | ||||
public static final String TAG_PAYMENTS_ENABLED = "paymentsEnabled"; | public static final String TAG_PAYMENTS_ENABLED = "paymentsEnabled"; | ||||
public static final String TAG_ENTITY_CLASSES = "entityClasses"; | public static final String TAG_ENTITY_CLASSES = "entityClasses"; | ||||
@@ -276,6 +278,7 @@ public class BubbleConfiguration extends PgRestServerConfiguration | |||||
{TAG_ALLOW_REGISTRATION, thisNetwork == null ? null : thisNetwork.getBooleanTag(TAG_ALLOW_REGISTRATION, false)}, | {TAG_ALLOW_REGISTRATION, thisNetwork == null ? null : thisNetwork.getBooleanTag(TAG_ALLOW_REGISTRATION, false)}, | ||||
{TAG_NETWORK_UUID, thisNetwork == null ? null : thisNetwork.getUuid()}, | {TAG_NETWORK_UUID, thisNetwork == null ? null : thisNetwork.getUuid()}, | ||||
{TAG_SAGE_LAUNCHER, thisNetwork == null || isSageLauncher()}, | {TAG_SAGE_LAUNCHER, thisNetwork == null || isSageLauncher()}, | ||||
{TAG_BUBBLE_NODE, thisNetwork == null ? null : thisNetwork.getInstallType() == AnsibleInstallType.node}, | |||||
{TAG_PAYMENTS_ENABLED, cloudDAO.paymentsEnabled()}, | {TAG_PAYMENTS_ENABLED, cloudDAO.paymentsEnabled()}, | ||||
{TAG_PROMO_CODE_POLICY, getPromoCodePolicy().name()}, | {TAG_PROMO_CODE_POLICY, getPromoCodePolicy().name()}, | ||||
{TAG_REQUIRE_SEND_METRICS, requireSendMetrics()}, | {TAG_REQUIRE_SEND_METRICS, requireSendMetrics()}, | ||||
@@ -98,6 +98,9 @@ public abstract class EntityIterator implements Iterator<Identifiable> { | |||||
} else { | } else { | ||||
noopClouds.put(type, cs); | noopClouds.put(type, cs); | ||||
} | } | ||||
} else { | |||||
// for new node, cloud services become templates | |||||
cs.setTemplate(true); | |||||
} | } | ||||
} | } | ||||
add(setLocalStoragePath(cs)); | add(setLocalStoragePath(cs)); | ||||
@@ -82,12 +82,12 @@ button_label_set_locale=Set Language | |||||
field_label_locale=Language | field_label_locale=Language | ||||
field_label_timezone=Time Zone | field_label_timezone=Time Zone | ||||
# Sidebar menu | |||||
# Menu | |||||
label_menu_dashboard=Dashboard | label_menu_dashboard=Dashboard | ||||
label_menu_dashboard_icon=fa fa-home | label_menu_dashboard_icon=fa fa-home | ||||
label_menu_admin=Admin | label_menu_admin=Admin | ||||
label_menu_admin_icon=fa fa-cog | label_menu_admin_icon=fa fa-cog | ||||
label_menu_admin_users=Accounts | |||||
label_menu_admin_users=Users | |||||
label_menu_admin_users_icon=fa fa-user-cog | label_menu_admin_users_icon=fa fa-user-cog | ||||
label_menu_admin_model=System Objects | label_menu_admin_model=System Objects | ||||
label_menu_admin_model_icon=fa fa-boxes | label_menu_admin_model_icon=fa fa-boxes | ||||
@@ -95,7 +95,7 @@ label_menu_admin_networks=User Bubbles | |||||
label_menu_admin_networks_icon=fa fa-dot-circle | label_menu_admin_networks_icon=fa fa-dot-circle | ||||
label_menu_admin_bills=User Bills | label_menu_admin_bills=User Bills | ||||
label_menu_admin_bills_icon=fa fa-money-check-alt | label_menu_admin_bills_icon=fa fa-money-check-alt | ||||
label_menu_account=Account | |||||
label_menu_account=My Account | |||||
label_menu_account_icon=fa fa-user | label_menu_account_icon=fa fa-user | ||||
label_menu_devices=Devices | label_menu_devices=Devices | ||||
label_menu_devices_icon=fa fa-mobile-alt | label_menu_devices_icon=fa fa-mobile-alt | ||||
@@ -1 +1 @@ | |||||
Subproject commit c2e48de27c60183c3c7e8bf9f4d59585bc9b8f2c | |||||
Subproject commit b7f7d68eed6d07d35ef2f8f126dc9a7f1624d085 |