From 8434fdb3dece94a80cb07695bcdcd898c0377d15 Mon Sep 17 00:00:00 2001 From: Giorgi Kavrelishvili Date: Mon, 13 Nov 2023 09:18:43 +0400 Subject: [PATCH] Add the conditional to check for read access as well --- src/placeos-rest-api/utilities/current-user.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/placeos-rest-api/utilities/current-user.cr b/src/placeos-rest-api/utilities/current-user.cr index d1202d39..2e4b4f29 100644 --- a/src/placeos-rest-api/utilities/current-user.cr +++ b/src/placeos-rest-api/utilities/current-user.cr @@ -17,7 +17,7 @@ module PlaceOS::Api block_access = true if request.method.downcase == "get" - block_access = !access.none? + block_access = !access.none? || !access.read? else block_access = !access.write? end