e89c3df
Switch BW clients from Basic to Client creds
Click to expand commit body
Basic credentials are only usable for id.bandwidth.com, both gems prefer
api.bandwidth.com, and only iris seems to fall back to id. This adds the new
client cred fields to the config and uses them throughout.
c7e522f
Restrict new users from outbound call/text
Click to expand commit body
Create a new trust level "Cellar" that cannot call or text or
invite (simlar to Tomb, but semantically different and can pay etc).
This is now the default trust level until an account receives at least
one text "from a person". Accounts before a certain date are
grandfathered in to now get this level. Port ins will get to bypass this
because the reachability SMS reply will count as a text from a person.
Accounts invited in any way except a group code will also bypass Cellar.
The instructions on the payment form and the welcome message are both
updated to warn of this new restriction. Note that the welcome message
is conditional to only include the warning if it applies to the customer
by that point.
Texts from short codes or with links or codes or from support do not
count as "from a person". There is also a block list of numbers in redis
to restrict what numbers are "from a person". The number that got an
account past Cellar is stored for possible addition to the block list.
- `MigrateBilling` passes a string for a tel, previously causing
NoMethodError when `Payment.for` says `product.price`
- Introduces a new MigrateBilling class in lib so that unit tests
capture any changes that break this in the future
- Edit .rubocop.yml to exclude `when_ready` from
`Lint/ConstantDefinitionInBlock`, which was raised just now because
this commit touched sgx_jmp.rb . I think this is the best solution
because those constants (`REDIS`, `DB`, etc.) are used as globals
throughout the codebase. Since many of them require a running EM
reactor, changing this would require extensive refactoring.
note: in `test/test_admin_command`, the "-removal was to satisfy
rubocop, which my pre-commit hook caught because it only runs rubocop on
changed files.
- should behave identically to previous script if no rows found,
manually running it just produces an empty array for
`PortRepo::Db.list`, i guess our client knows about no rows errors
- allowed `OptionParser.new` to hold a huge block because this block is
just naturally very large. Alternatively, we could write separate
files just for argument parsing, eg `lib/bin_arg_parsers/{args.rb,
parser.rb}`. But that's probably a separate ticket