OpenBankProject / OpenBankProject/OBP-API
When user attempts to create transaction request for account they don't own, show possible permissions they need
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-requestswith a user which does not have thecanCreateAnyTransactionRequestpermission.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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