feat: us ssn
This commit is contained in:
parent
d065baeda9
commit
5887a301fb
6 changed files with 29 additions and 10 deletions
|
|
@ -409,7 +409,7 @@ function migrateComplianceTriggers (config) {
|
|||
|
||||
return {
|
||||
triggers,
|
||||
['compliance_rejectAddressReuse']: rejectAddressReuseActive
|
||||
['compliance_rejectAddressReuse']: global.rejectAddressReuseActive
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ function update (id, data, userToken, txId) {
|
|||
*/
|
||||
async function updateCustomer (id, data) {
|
||||
const formattedData = _.pick(
|
||||
['authorized_override', 'id_card_photo_override', 'id_card_data_override', 'sms_override'],
|
||||
['authorized_override', 'id_card_photo_override', 'id_card_data_override', 'sms_override', 'us_ssn_override'],
|
||||
_.mapKeys(_.snakeCase, data))
|
||||
|
||||
const sql = Pgp.helpers.update(formattedData, _.keys(formattedData), 'customers') +
|
||||
|
|
@ -234,7 +234,8 @@ function getComplianceTypes () {
|
|||
'id_card_photo',
|
||||
'front_camera',
|
||||
'sanctions',
|
||||
'authorized' ]
|
||||
'authorized',
|
||||
'us_ssn' ]
|
||||
}
|
||||
|
||||
function enhanceAtFields (fields) {
|
||||
|
|
@ -243,7 +244,8 @@ function enhanceAtFields (fields) {
|
|||
'id_card_photo',
|
||||
'front_camera',
|
||||
'sanctions',
|
||||
'authorized'
|
||||
'authorized',
|
||||
'us_ssn'
|
||||
]
|
||||
|
||||
const updatedFields = _.intersection(updateableFields, _.keys(fields))
|
||||
|
|
|
|||
|
|
@ -108,10 +108,10 @@ function poll (req, res, next) {
|
|||
const compatTriggers = complianceTriggers.getBackwardsCompatibleTriggers(triggers)
|
||||
response.smsVerificationActive = !!compatTriggers.sms
|
||||
response.smsVerificationThreshold = compatTriggers.sms
|
||||
response.idCardDataVerificationActive = !!compatTriggers.idData
|
||||
response.idCardDataVerificationThreshold = compatTriggers.idData
|
||||
response.idCardPhotoVerificationActive = !!compatTriggers.idPhoto
|
||||
response.idCardPhotoVerificationThreshold = compatTriggers.idPhoto
|
||||
response.idCardDataVerificationActive = !!compatTriggers.idCardData
|
||||
response.idCardDataVerificationThreshold = compatTriggers.idCardData
|
||||
response.idCardPhotoVerificationActive = !!compatTriggers.idCardPhoto
|
||||
response.idCardPhotoVerificationThreshold = compatTriggers.idCardPhoto
|
||||
response.sanctionsVerificationActive = !!compatTriggers.sancations
|
||||
response.sanctionsVerificationThreshold = compatTriggers.sancations
|
||||
response.frontCameraVerificationActive = !!compatTriggers.facephoto
|
||||
|
|
|
|||
17
migrations/1601908070568-us-ssn.js
Normal file
17
migrations/1601908070568-us-ssn.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
const db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sql = [
|
||||
'ALTER TABLE customers ADD COLUMN us_ssn text',
|
||||
'ALTER TABLE customers ADD COLUMN us_ssn_at timestamptz',
|
||||
"ALTER TABLE customers ADD COLUMN us_ssn_override verification_type not null default 'automatic'",
|
||||
'ALTER TABLE customers ADD COLUMN us_ssn_override_by text references user_tokens (token)',
|
||||
'ALTER TABLE customers ADD COLUMN us_ssn_override_at timestamptz',
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
|
|
@ -117,7 +117,7 @@ const getRequirementText = config => {
|
|||
return 'asked to scan a ID'
|
||||
case 'facephoto':
|
||||
return 'asked to have a photo taken'
|
||||
case 'us-ssn':
|
||||
case 'usSsn':
|
||||
return 'asked to input his social security number'
|
||||
case 'sanctions':
|
||||
return 'matched against the OFAC sanctions list'
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ const requirementOptions = [
|
|||
{ display: 'ID data', code: 'idCardData' },
|
||||
{ display: 'Customer camera', code: 'facephoto' },
|
||||
{ display: 'Sanctions', code: 'sanctions' },
|
||||
{ display: 'US SSN', code: 'us-ssn' },
|
||||
{ display: 'US SSN', code: 'usSsn' },
|
||||
// { display: 'Super user', code: 'superuser' },
|
||||
{ display: 'Suspend', code: 'suspend' },
|
||||
{ display: 'Block', code: 'block' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue