mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 15:47:01 +00:00
feature/viewPermission store snake case instead of camel case in database - step4
This commit is contained in:
parent
103914dcea
commit
177f6f3e2a
@ -37,6 +37,8 @@ object BalanceNewStyle {
|
||||
Future {
|
||||
val (views, accountAccesses) = Views.views.vend.privateViewsUserCanAccessAtBank(user, bankId)
|
||||
// Filter views which can read the balance
|
||||
// println("xxxxxxx")
|
||||
println(views.map(_.allowed_actions))
|
||||
val canSeeBankAccountBalanceViews = views.filter(_.allowed_actions.exists( _ == CAN_SEE_BANK_ACCOUNT_BALANCE))
|
||||
// Filter accounts the user has permission to see balances and remove duplicates
|
||||
val allowedAccounts = APIUtil.intersectAccountAccessAndView(accountAccesses, canSeeBankAccountBalanceViews)
|
||||
|
||||
@ -71,6 +71,10 @@ object LocalMappedConnectorInternal extends MdcLoggable {
|
||||
fromBankIdAccountId = BankIdAccountId(fromAccount.bankId, fromAccount.accountId)
|
||||
view <- NewStyle.function.checkAccountAccessAndGetView(viewId, fromBankIdAccountId, Full(user), callContext)
|
||||
_ <- Helper.booleanToFuture(InsufficientAuthorisationToCreateTransactionRequest, cc = callContext) {
|
||||
// println("xxxxxxxxx")
|
||||
// println(view.allowed_actions)
|
||||
// println(CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT)
|
||||
// println(view.allowed_actions.exists(_ ==CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT))
|
||||
view.allowed_actions.exists(_ ==CAN_ADD_TRANSACTION_REQUEST_TO_ANY_ACCOUNT)
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user