Skip to content

Commit

Permalink
PP-13313 Allow only Worldpay accounts to view Worldpay Details settin…
Browse files Browse the repository at this point in the history
…gs (#4395)

* PP-13313 Allow only Worldpay accounts to view Worldpay Details settings
  • Loading branch information
DomBelcher authored Dec 20, 2024
1 parent 8d90726 commit ab6bc1f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/simplified-account-routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const userIsAuthorised = require('@middleware/user-is-authorised')
const permission = require('@middleware/permission')
const paths = require('./paths')
const serviceSettingsController = require('@controllers/simplified-account/settings')
const { STRIPE } = require('@models/payment-providers')
const { STRIPE, WORLDPAY } = require('@models/payment-providers')
const { GOV_ENTITY_DOC_FORM_FIELD_NAME } = require('@controllers/simplified-account/settings/stripe-details/government-entity-document/constants')

const upload = multer({ storage: multer.memoryStorage() })
Expand Down Expand Up @@ -63,12 +63,9 @@ simplifiedAccount.get(paths.simplifiedAccount.settings.cardTypes.index, permissi
simplifiedAccount.post(paths.simplifiedAccount.settings.cardTypes.index, permission('payment-types:update'), serviceSettingsController.cardTypes.post)

// worldpay details
simplifiedAccount.get(paths.simplifiedAccount.settings.worldpayDetails.index, permission('gateway-credentials:read'), serviceSettingsController.worldpayDetails.get)

// worldpay details
simplifiedAccount.get(paths.simplifiedAccount.settings.worldpayDetails.index, permission('gateway-credentials:read'), serviceSettingsController.worldpayDetails.get)
simplifiedAccount.get(paths.simplifiedAccount.settings.worldpayDetails.oneOffCustomerInitiated, permission('gateway-credentials:update'), serviceSettingsController.worldpayDetails.worldpayCredentials.get)
simplifiedAccount.post(paths.simplifiedAccount.settings.worldpayDetails.oneOffCustomerInitiated, permission('gateway-credentials:update'), serviceSettingsController.worldpayDetails.worldpayCredentials.post)
simplifiedAccount.get(paths.simplifiedAccount.settings.worldpayDetails.index, enforcePaymentProviderType(WORLDPAY), permission('gateway-credentials:read'), serviceSettingsController.worldpayDetails.get)
simplifiedAccount.get(paths.simplifiedAccount.settings.worldpayDetails.oneOffCustomerInitiated, enforcePaymentProviderType(WORLDPAY), permission('gateway-credentials:update'), serviceSettingsController.worldpayDetails.worldpayCredentials.get)
simplifiedAccount.post(paths.simplifiedAccount.settings.worldpayDetails.oneOffCustomerInitiated, enforcePaymentProviderType(WORLDPAY), permission('gateway-credentials:update'), serviceSettingsController.worldpayDetails.worldpayCredentials.post)

// card types
simplifiedAccount.get(paths.simplifiedAccount.settings.cardTypes.index, permission('transactions:read'), serviceSettingsController.cardTypes.get)
Expand Down

0 comments on commit ab6bc1f

Please sign in to comment.