From 399c9835d4a4ed5d71043ce15af744a8fa46f32d Mon Sep 17 00:00:00 2001 From: Daniel Bell Date: Fri, 29 Sep 2023 21:34:45 +0200 Subject: [PATCH] rename method --- .../bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala | 2 +- .../bluebrain/nexus/delta/sdk/directives/AuthDirectives.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala index 18a0738058..3eb2367b7d 100644 --- a/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala +++ b/delta/app/src/main/scala/ch/epfl/bluebrain/nexus/delta/routes/UserPermissionsRoutes.scala @@ -43,7 +43,7 @@ final class UserPermissionsRoutes(identities: Identities, aclCheck: AclCheck, st } }, parameters("storage".as[IdSegment], "type".as[AccessType]) { (storageId, `type`) => - authorizeForAsync( + authorizeForIO( AclAddress.fromProject(project), storages.permissionFor(IdSegmentRef(storageId), project, `type`) )(caller) { diff --git a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/AuthDirectives.scala b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/AuthDirectives.scala index 0a537b090c..a79cd85448 100644 --- a/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/AuthDirectives.scala +++ b/delta/sdk/src/main/scala/ch/epfl/bluebrain/nexus/delta/sdk/directives/AuthDirectives.scala @@ -68,7 +68,7 @@ abstract class AuthDirectives(identities: Identities, aclCheck: AclCheck) { def authorizeFor(path: AclAddress, permission: Permission)(implicit caller: Caller): Directive0 = authorizeAsync(toCatsIO(aclCheck.authorizeFor(path, permission)).unsafeToFuture()) or failWith(AuthorizationFailed) - def authorizeForAsync(path: AclAddress, fetchPermission: IO[Permission])(implicit caller: Caller): Directive0 = { + def authorizeForIO(path: AclAddress, fetchPermission: IO[Permission])(implicit caller: Caller): Directive0 = { val check = fetchPermission.flatMap(permission => toCatsIO(aclCheck.authorizeFor(path, permission))) authorizeAsync(check.unsafeToFuture()) or failWith(AuthorizationFailed) }