mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 18:46:46 +00:00
rename allViewsUserCanSeeForThisAccount--> allViewsUserCanAccessForAccount
This commit is contained in:
parent
ea1111c312
commit
df913d1e93
@ -369,7 +369,7 @@ trait BankAccount extends MdcLoggable {
|
||||
*/
|
||||
final def permittedViews(user: Box[User]) : List[View] = {
|
||||
user match {
|
||||
case Full(u) => u.allViewsUserCanSeeForThisAccount(this)
|
||||
case Full(u) => u.allViewsUserCanAccessForAccount(this)
|
||||
case _ =>{
|
||||
//logger.debug("No user was passed to permittedViews")
|
||||
Views.views.vend.publicViewsForAccount(BankIdAccountId(this.bankId, this.accountId))
|
||||
|
||||
@ -94,7 +94,7 @@ trait User extends MdcLoggable {
|
||||
!(ViewPrivileges.count(By(ViewPrivileges.user, this.resourceUserId.value), By(ViewPrivileges.view, viewImpl.id)) == 0)
|
||||
}
|
||||
|
||||
final def allViewsUserCanSeeForThisAccount(bankAccount: BankAccount) : List[View] =
|
||||
final def allViewsUserCanAccessForAccount(bankAccount: BankAccount) : List[View] =
|
||||
allViewsUserCanAccess.filter(
|
||||
view =>
|
||||
view.bankId == bankAccount.bankId &&
|
||||
@ -102,7 +102,7 @@ trait User extends MdcLoggable {
|
||||
)
|
||||
|
||||
final def canInitiateTransactions(bankAccount: BankAccount) : Box[Unit] ={
|
||||
if(allViewsUserCanSeeForThisAccount(bankAccount).exists(_.canInitiateTransaction)){
|
||||
if(allViewsUserCanAccessForAccount(bankAccount).exists(_.canInitiateTransaction)){
|
||||
Full()
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user