mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:56:46 +00:00
bugfix/fixed the method obtainAuthContextOfOwnerUserOrElseConsentOwnerUser
This commit is contained in:
parent
04064d4aae
commit
fe56c3d9f6
@ -57,7 +57,10 @@ case class CallContext(
|
||||
|
||||
private def obtainAuthContextOfOwnerUserOrElseConsentOwnerUser(userId: String, consentUserId: String): Box[List[UserAuthContext]] = {
|
||||
// Try to find the Auth Context of logged in user
|
||||
UserAuthContextProvider.userAuthContextProvider.vend.getUserAuthContextsBox(userId) orElse {
|
||||
val userAuthContext= UserAuthContextProvider.userAuthContextProvider.vend.getUserAuthContextsBox(userId)
|
||||
if (userAuthContext.isDefined && userAuthContext.head.nonEmpty){
|
||||
userAuthContext
|
||||
} else{
|
||||
// Try to find the Auth Context of the user created Berlin Group Consent
|
||||
UserAuthContextProvider.userAuthContextProvider.vend.getUserAuthContextsBox(consentUserId)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user