Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone committed Apr 8, 2024
1 parent 2568d04 commit 06bd4ee
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,15 @@ final case class PermissionsResponder(
List(builtIn.KnownUser.id.value),
)
ZIO
.foldLeft(precedence)(None: Option[Set[PermissionADM]])((result, groups) =>
result match {
case Some(value) => ZIO.some(value)
case None =>
administrativePermissionForGroupsGetADM(projectIri, groups)
.when(groups.forall(extendedUserGroups.contains))
.map(_.filter(_.nonEmpty))
},
.foldLeft(precedence)(None: Option[Set[PermissionADM]])(
(result: Option[Set[PermissionADM]], groups: Seq[IRI]) =>
result match {
case Some(value) => ZIO.some(value)
case None =>
administrativePermissionForGroupsGetADM(projectIri, groups)
.when(groups.forall(extendedUserGroups.contains))
.map(_.filter(_.nonEmpty))
},
)
.map(_.getOrElse(Set.empty))
.map((projectIri, _))
Expand Down

0 comments on commit 06bd4ee

Please sign in to comment.