Skip to content

Commit

Permalink
Utils func changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnlaugurG committed Dec 20, 2024
1 parent 5674341 commit 4a275ae
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ApiScopeInfo } from '../delegations-incoming.service'

export default function filterByCustomScopeRule(
scope: ApiScopeInfo,
filterOutForDelegationType: AuthDelegationType[],
customScopeRules: {
scopeName: string
onlyForDelegationType: string[]
Expand All @@ -14,7 +15,7 @@ export default function filterByCustomScopeRule(
return true
}

return foundCSR.onlyForDelegationType.includes(
AuthDelegationType.GeneralMandate,
return foundCSR.onlyForDelegationType.some((type) =>
filterOutForDelegationType.includes(type as AuthDelegationType),
)
}

0 comments on commit 4a275ae

Please sign in to comment.