OpenBankProject / OpenBankProject/OBP-API

When user attempts to create transaction request for account they don't own, show possible permissions they need

Open
#1,316 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.7k
Forks
482
Avg merge
1d 12h
Merged PRs (30d)
15

Description

Currently (12bd9a3d2a94573e24958da6b4e68abbb1baa0c5) when a user attempts to create a transaction request /obp/v3.1.0/banks/BANK_ID/accounts/ACCOUNT_ID/VIEW_ID/transaction-request-types/SEPA/transaction-requests when they don't have the canCreateAnyTransactionRequest entitlement then a traceback occurs.

Steps to reproduce:

  • Attempt to create a transaction request /obp/v3.1.0/banks/BANK_ID/accounts/ACCOUNT_ID/VIEW_ID/transaction-request-types/SEPA/transaction-requests with a user which does not have the canCreateAnyTransactionRequest permission.

Expected behaviour:
The response should be:

OBP-40002: Insufficient authorisation to create TransactionRequest. The Transaction Request could not be created because you don't have access to the owner view of the from account or you don't have access to canCreateAnyTransactionRequest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the request against /obp/v3.1.0/banks/BANK_ID/accounts/ACCOUNT_ID/VIEW_ID/transaction-request-types/SEPA/transaction-requests with a user lacking canCreateAnyTransactionRequest, and inspect the traceback. Done means the endpoint returns OBP-40002 with the stated explanation covering owner-view access and the missing entitlement.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, authorization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.