kris/delete_account
a master
4 anni fa
@@ -29,8 +29,7 @@ function die { | |||||
BASE=$(cd $(dirname $0)/.. && pwd) | BASE=$(cd $(dirname $0)/.. && pwd) | ||||
cd ${BASE} | cd ${BASE} | ||||
git submodule init || die "Error in git submodule init" | |||||
git submodule update || die "Error in git submodule update" | |||||
git submodule update --init --recursive || die "Error in git submodule update" | |||||
pushd utils/cobbzilla-parent | pushd utils/cobbzilla-parent | ||||
mvn install || die "Error installing cobbzilla-parent" | mvn install || die "Error installing cobbzilla-parent" | ||||
@@ -50,9 +49,6 @@ for repo in ${UTIL_REPOS} ; do | |||||
done | done | ||||
popd | popd | ||||
MESSAGES_REPO=bubble-server/src/main/resources/messages | |||||
pushd ${MESSAGES_REPO} && git checkout master && popd || die "Error installing ${MESSAGES_REPO}" | |||||
if [[ -z "${BUBBLE_SETUP_MODE}" || "${BUBBLE_SETUP_MODE}" == "web" ]] ; then | if [[ -z "${BUBBLE_SETUP_MODE}" || "${BUBBLE_SETUP_MODE}" == "web" ]] ; then | ||||
INSTALL_WEB=web mvn -DskipTests=true -Dcheckstyle.skip=true clean package || die "Error building bubble jar" | INSTALL_WEB=web mvn -DskipTests=true -Dcheckstyle.skip=true clean package || die "Error building bubble jar" | ||||
@@ -32,10 +32,10 @@ cd ${BASE} | |||||
git fetch || die "Error calling git fetch" | git fetch || die "Error calling git fetch" | ||||
git pull origin master || die "Error calling git pull origin master" | git pull origin master || die "Error calling git pull origin master" | ||||
git submodule update || die "Error in git submodule update" | |||||
git submodule update --init --recursive || die "Error in git submodule update" | |||||
pushd utils/cobbzilla-parent | pushd utils/cobbzilla-parent | ||||
git fetch && git checkout master && git pull origin master && mvn install || die "Error updating cobbzilla-parent" | |||||
mvn install || die "Error installing cobbzilla-parent" | |||||
popd | popd | ||||
UTIL_REPOS=" | UTIL_REPOS=" | ||||
@@ -49,16 +49,13 @@ abp-parser | |||||
pushd utils | pushd utils | ||||
for repo in ${UTIL_REPOS} ; do | for repo in ${UTIL_REPOS} ; do | ||||
if [[ ${FAST} -eq 1 ]] ; then | if [[ ${FAST} -eq 1 ]] ; then | ||||
pushd ${repo} && git fetch && git checkout master && git pull origin master && mvn -DskipTests=true -Dcheckstyle.skip=true install && popd || die "Error updating ${repo}" | |||||
pushd ${repo} && mvn -DskipTests=true -Dcheckstyle.skip=true install && popd || die "Error installing ${repo}" | |||||
else | else | ||||
pushd ${repo} && git fetch && git checkout master && git pull origin master && mvn -DskipTests=true -Dcheckstyle.skip=true clean install && popd || die "Error updating ${repo}" | |||||
pushd ${repo} && mvn -DskipTests=true -Dcheckstyle.skip=true clean install && popd || die "Error installing ${repo}" | |||||
fi | fi | ||||
done | done | ||||
popd | popd | ||||
MESSAGES_REPO=bubble-server/src/main/resources/messages | |||||
pushd ${MESSAGES_REPO} && git fetch && git checkout master && git pull origin master && popd || die "Error updating ${MESSAGES_REPO}" | |||||
if [[ ${FAST} -eq 1 ]] ; then | if [[ ${FAST} -eq 1 ]] ; then | ||||
mvn -DskipTests=true -Dcheckstyle.skip=true clean package || die "Error building bubble jar" | mvn -DskipTests=true -Dcheckstyle.skip=true clean package || die "Error building bubble jar" | ||||
else | else | ||||
@@ -13,6 +13,7 @@ import bubble.dao.bill.AccountPaymentArchivedDAO; | |||||
import bubble.dao.bill.BillDAO; | import bubble.dao.bill.BillDAO; | ||||
import bubble.dao.cloud.BubbleDomainDAO; | import bubble.dao.cloud.BubbleDomainDAO; | ||||
import bubble.dao.cloud.BubbleFootprintDAO; | import bubble.dao.cloud.BubbleFootprintDAO; | ||||
import bubble.dao.cloud.BubbleNetworkDAO; | |||||
import bubble.dao.cloud.CloudServiceDAO; | import bubble.dao.cloud.CloudServiceDAO; | ||||
import bubble.dao.device.DeviceDAO; | import bubble.dao.device.DeviceDAO; | ||||
import bubble.model.account.*; | import bubble.model.account.*; | ||||
@@ -410,6 +411,10 @@ public class AccountDAO extends AbstractCRUDDAO<Account> implements SqlViewSearc | |||||
configuration.getBean(AccountPaymentArchivedDAO.class).createForAccount(account); | configuration.getBean(AccountPaymentArchivedDAO.class).createForAccount(account); | ||||
log.info("delete: starting to delete account-dependent objects - " + currentThread().getName()); | log.info("delete: starting to delete account-dependent objects - " + currentThread().getName()); | ||||
final BubbleNetworkDAO networkDAO = configuration.getBean(BubbleNetworkDAO.class); | |||||
final List<BubbleNetwork> networks = networkDAO.findByAccount(account.getUuid()); | |||||
networks.forEach(n -> networkDAO.delete(n.getUuid())); // deleting all networks dependency objects | |||||
configuration.deleteDependencies(account); | configuration.deleteDependencies(account); | ||||
log.info("delete: finished deleting account-dependent objects - " + currentThread().getName()); | log.info("delete: finished deleting account-dependent objects - " + currentThread().getName()); | ||||
@@ -99,7 +99,7 @@ public class AccountInitializer implements Runnable { | |||||
.setAccount(accountUuid) | .setAccount(accountUuid) | ||||
.setName(accountUuid) | .setName(accountUuid) | ||||
.setNetwork(thisNetwork.getUuid()) | .setNetwork(thisNetwork.getUuid()) | ||||
.setMessageType(AccountMessageType.notice) | |||||
.setMessageType(AccountMessageType.request) | |||||
.setAction(AccountAction.welcome) | .setAction(AccountAction.welcome) | ||||
.setTarget(ActionTarget.account) | .setTarget(ActionTarget.account) | ||||
.setContact(contact)); | .setContact(contact)); | ||||
@@ -166,9 +166,6 @@ public class AccountMessageDAO extends AccountOwnedEntityDAO<AccountMessage> { | |||||
} | } | ||||
public AccountMessage findOperationRequest(AccountMessage basis) { | public AccountMessage findOperationRequest(AccountMessage basis) { | ||||
if (basis.getAction() == AccountAction.welcome && basis.getTarget() == ActionTarget.account) { | |||||
return findWelcomeNotice(basis); | |||||
} | |||||
return findByUniqueFields("account", basis.getAccount(), | return findByUniqueFields("account", basis.getAccount(), | ||||
"name", basis.getName(), | "name", basis.getName(), | ||||
"requestId", basis.getRequestId(), | "requestId", basis.getRequestId(), | ||||
@@ -177,15 +174,6 @@ public class AccountMessageDAO extends AccountOwnedEntityDAO<AccountMessage> { | |||||
"target", basis.getTarget()); | "target", basis.getTarget()); | ||||
} | } | ||||
public AccountMessage findWelcomeNotice(AccountMessage basis) { | |||||
return findByUniqueFields("account", basis.getAccount(), | |||||
"name", basis.getName(), | |||||
"requestId", basis.getRequestId(), | |||||
"messageType", AccountMessageType.notice, | |||||
"action", AccountAction.welcome, | |||||
"target", ActionTarget.account); | |||||
} | |||||
public List<AccountMessage> findOperationDenials(AccountMessage basis) { | public List<AccountMessage> findOperationDenials(AccountMessage basis) { | ||||
if (basis == null) { | if (basis == null) { | ||||
return Collections.emptyList(); | return Collections.emptyList(); | ||||
@@ -208,7 +208,7 @@ public class AccountContact implements Serializable { | |||||
if (!verified()) { | if (!verified()) { | ||||
if ( target == ActionTarget.account && ( | if ( target == ActionTarget.account && ( | ||||
(action == AccountAction.verify) // all verification-related messages are allowed to unverified | (action == AccountAction.verify) // all verification-related messages are allowed to unverified | ||||
|| (type == AccountMessageType.notice && action == AccountAction.welcome) // welcome is allowed to unverified | |||||
|| (type == AccountMessageType.request && action == AccountAction.welcome) // welcome is allowed to unverified | |||||
) ) { | ) ) { | ||||
log.info("isAllowed(" + message.getAction() + "): allowing "+type+" message to unverified contact: "+action); | log.info("isAllowed(" + message.getAction() + "): allowing "+type+" message to unverified contact: "+action); | ||||
} else { | } else { | ||||
@@ -97,8 +97,8 @@ public class AccountMessage extends IdentifiableBase implements HasAccount { | |||||
public String templateName(String basename) { return getMessageType()+"/"+ getAction()+"/"+getTarget()+"/"+basename+".hbs"; } | public String templateName(String basename) { return getMessageType()+"/"+ getAction()+"/"+getTarget()+"/"+basename+".hbs"; } | ||||
public long tokenTimeoutSeconds(AccountPolicy policy) { | public long tokenTimeoutSeconds(AccountPolicy policy) { | ||||
// only requests and welcome message get tokens (welcome messages also verify the initial email address) | |||||
if (getMessageType() == AccountMessageType.request || (getMessageType() == AccountMessageType.notice && getAction() == AccountAction.welcome)) { | |||||
if (getMessageType() == AccountMessageType.request) { | |||||
// only requests get tokens | |||||
switch (getTarget()) { | switch (getTarget()) { | ||||
case account: return policy.getAccountOperationTimeout()/1000; | case account: return policy.getAccountOperationTimeout()/1000; | ||||
case network: return policy.getNodeOperationTimeout()/1000; | case network: return policy.getNodeOperationTimeout()/1000; | ||||
@@ -18,6 +18,7 @@ import bubble.model.account.message.handlers.*; | |||||
import bubble.model.cloud.CloudService; | import bubble.model.cloud.CloudService; | ||||
import bubble.server.BubbleConfiguration; | import bubble.server.BubbleConfiguration; | ||||
import lombok.Getter; | import lombok.Getter; | ||||
import lombok.NonNull; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.cobbzilla.util.collection.NameAndValue; | import org.cobbzilla.util.collection.NameAndValue; | ||||
import org.cobbzilla.util.string.StringUtil; | import org.cobbzilla.util.string.StringUtil; | ||||
@@ -47,7 +48,29 @@ public class StandardAccountMessageService implements AccountMessageService { | |||||
@Autowired private CloudServiceDAO cloudDAO; | @Autowired private CloudServiceDAO cloudDAO; | ||||
@Autowired private BubbleConfiguration configuration; | @Autowired private BubbleConfiguration configuration; | ||||
/** | |||||
* If returns true, then email/sms will NOT be sent out for this AccountMessage object. | |||||
*/ | |||||
private boolean isQuietMessage(@NonNull final AccountMessage message) { | |||||
if (message.getMessageType() == AccountMessageType.confirmation | |||||
&& message.getAction() == AccountAction.welcome | |||||
&& message.getTarget() == ActionTarget.account) { | |||||
// No need for confirmation message here. The end user received `request.welcome.account` message with email | |||||
// address verification link. When he clicked the link, then the request was approved. That was the only | |||||
// required approval, and so it was also confirmed at that moment. Hence, AccountMessage | |||||
// `confirmation.welcome.account` is created. But there no real need to send out email at this point to the | |||||
// same user. And so this other confirmation message is `quiet`. | |||||
return true; | |||||
} | |||||
return false; | |||||
} | |||||
@Override public boolean send(AccountMessage message) { | @Override public boolean send(AccountMessage message) { | ||||
if (isQuietMessage(message)) { | |||||
log.info("send(" + message + "): message marked as quiet"); | |||||
return false; | |||||
} | |||||
final String accountUuid = message.getAccount(); | final String accountUuid = message.getAccount(); | ||||
final Account account = accountDAO.findByUuid(accountUuid); | final Account account = accountDAO.findByUuid(accountUuid); | ||||
AccountPolicy policy = policyDAO.findSingleByAccount(accountUuid); | AccountPolicy policy = policyDAO.findSingleByAccount(accountUuid); | ||||
@@ -140,16 +163,19 @@ public class StandardAccountMessageService implements AccountMessageService { | |||||
final AccountMessage request = messageDAO.findOperationRequest(approval); | final AccountMessage request = messageDAO.findOperationRequest(approval); | ||||
if (request == null) throw invalidEx("err.approvalToken.invalid", "Request could not be found for approval: "+approval); | if (request == null) throw invalidEx("err.approvalToken.invalid", "Request could not be found for approval: "+approval); | ||||
final AccountPolicy policy = policyDAO.findSingleByAccount(account.getUuid()); | final AccountPolicy policy = policyDAO.findSingleByAccount(account.getUuid()); | ||||
final AccountMessage confirm = messageDAO.create(new AccountMessage(approval).setMessageType(AccountMessageType.confirmation)); | |||||
approval.setRequest(request); | approval.setRequest(request); | ||||
approval.setRequestContact(policy.findContactByUuid(approval.getRequest().getContact())); | approval.setRequestContact(policy.findContactByUuid(approval.getRequest().getContact())); | ||||
getCompletionHandler(approval).confirm(approval, data); | getCompletionHandler(approval).confirm(approval, data); | ||||
final AccountMessage confirm = new AccountMessage(approval).setMessageType(AccountMessageType.confirmation); | |||||
if (approval.hasConfirmationTokensToRemove()) { | if (approval.hasConfirmationTokensToRemove()) { | ||||
final RedisService tokens = getConfirmationTokens(); | final RedisService tokens = getConfirmationTokens(); | ||||
for (String toRemove : approval.getConfirmationTokensToRemove()) tokens.del(toRemove); | for (String toRemove : approval.getConfirmationTokensToRemove()) tokens.del(toRemove); | ||||
} | } | ||||
return confirm; | |||||
// Write AccountMessage entity into database only if Account is still available in there | |||||
// (i.e. not removed with block_delete deletion policy) | |||||
return accountDAO.exists(confirm.getAccount()) ? messageDAO.create(confirm) : confirm; | |||||
} else if (approvalStatus.ok()) { | } else if (approvalStatus.ok()) { | ||||
if (approval.hasConfirmationTokensToRemove()) { | if (approval.hasConfirmationTokensToRemove()) { | ||||
@@ -1 +1 @@ | |||||
Subproject commit 04db22382ddffa08b3f05c024603da75cdfb8b55 | |||||
Subproject commit 6767812db299ffb810c8d88586a6462c670bfda7 |
@@ -41,7 +41,7 @@ | |||||
"store": "userInbox", | "store": "userInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "json.length == 1"}, | {"condition": "json.length == 1"}, | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -37,12 +37,12 @@ | |||||
"comment": "as root, check email inbox for welcome message", | "comment": "as root, check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "<<rootSessionName>>", | "session": "<<rootSessionName>>", | ||||
"uri": "debug/inbox/email/<<referredName>>@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/<<referredName>>@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -105,12 +105,12 @@ | |||||
"comment": "as root, check email inbox for welcome message", | "comment": "as root, check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_credit@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_credit@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -44,12 +44,12 @@ | |||||
"comment": "as root, check email inbox for welcome message", | "comment": "as root, check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_credit_refund_restart@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_credit_refund_restart@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -44,12 +44,12 @@ | |||||
"comment": "as root, check email inbox for welcome message", | "comment": "as root, check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_recurring@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_recurring@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -22,12 +22,12 @@ | |||||
"comment": "root: check email inbox for welcome message", | "comment": "root: check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/account_credit_user@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/account_credit_user@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -22,12 +22,12 @@ | |||||
"comment": "as root, check email inbox for welcome message", | "comment": "as root, check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_1mo_free@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_1mo_free@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -50,12 +50,12 @@ | |||||
"comment": "root: check email inbox for welcome message for referring user", | "comment": "root: check email inbox for welcome message for referring user", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_referring_multi@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_referring_multi@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' === 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' === 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' === 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' === 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' === 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' === 'account'"} | ||||
] | ] | ||||
@@ -45,12 +45,12 @@ | |||||
"comment": "root: check email inbox for welcome message for referring user", | "comment": "root: check email inbox for welcome message for referring user", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_referring_free@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_referring_free@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||
@@ -119,12 +119,12 @@ | |||||
"comment": "as root, check email inbox for welcome message", | "comment": "as root, check email inbox for welcome message", | ||||
"request": { | "request": { | ||||
"session": "rootSession", | "session": "rootSession", | ||||
"uri": "debug/inbox/email/test_user_referred_free@example.com?type=notice&action=welcome&target=account" | |||||
"uri": "debug/inbox/email/test_user_referred_free@example.com?type=request&action=welcome&target=account" | |||||
}, | }, | ||||
"response": { | "response": { | ||||
"store": "emailInbox", | "store": "emailInbox", | ||||
"check": [ | "check": [ | ||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'notice'"}, | |||||
{"condition": "'{{json.[0].ctx.message.messageType}}' == 'request'"}, | |||||
{"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | {"condition": "'{{json.[0].ctx.message.action}}' == 'welcome'"}, | ||||
{"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | {"condition": "'{{json.[0].ctx.message.target}}' == 'account'"} | ||||
] | ] | ||||