Skip to content

Commit

Permalink
src/bank-transactions: Check for admin privilleges regardless of env …
Browse files Browse the repository at this point in the history
…when simulating IRIS transactions
  • Loading branch information
sashko9807 committed Mar 4, 2024
1 parent ce45466 commit db91e4f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ export class BankTransactionsController {
const isDev = appEnv === 'development' || appEnv === 'staging'
if (!isDev) throw new ForbiddenException('Endpoint available only for testing enviroments')

if (appEnv === 'staging' && !isAdmin(user))
throw new ForbiddenException('Must be either an admin or active affiliate')
if (!isAdmin(user)) throw new ForbiddenException('Must be an admin')

return await this.bankTransactionsService.simulateIrisTask(
irisDto.irisIbanAccountInfo,
Expand Down

0 comments on commit db91e4f

Please sign in to comment.