From dac28ce0c56752a992e33ed0469e8068f47ff216 Mon Sep 17 00:00:00 2001 From: Christina Date: Fri, 6 Dec 2024 13:53:12 +0100 Subject: [PATCH] satisfy ameba 1.6.4 lint --- src/lavinmq/http/controller.cr | 5 +++-- src/lavinmq/http/controller/bindings.cr | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lavinmq/http/controller.cr b/src/lavinmq/http/controller.cr index f3559a8438..76b47c5004 100644 --- a/src/lavinmq/http/controller.cr +++ b/src/lavinmq/http/controller.cr @@ -226,8 +226,9 @@ module LavinMQ end private def refuse_unless_management(context, user, vhost = nil) - unless user.tags.any? { |t| t.administrator? || t.monitoring? || - t.policy_maker? || t.management? } + unless user.tags.any? do |t| + t.administrator? || t.monitoring? || t.policy_maker? || t.management? + end Log.warn { "user=#{user.name} does not have management access on vhost=#{vhost}" } access_refused(context) end diff --git a/src/lavinmq/http/controller/bindings.cr b/src/lavinmq/http/controller/bindings.cr index b516e519d6..726f1937f5 100644 --- a/src/lavinmq/http/controller/bindings.cr +++ b/src/lavinmq/http/controller/bindings.cr @@ -104,8 +104,10 @@ module LavinMQ @amqp_server.vhosts[vhost].unbind_queue(q.name, e.name, binding.routing_key, arguments) found = true - Log.debug { "exchange '#{e.name}' unbound from queue '#{q.name}' with " \ - " key '#{binding.routing_key}'" } + Log.debug do + "exchange '#{e.name}' unbound from queue '#{q.name}' with " \ + " key '#{binding.routing_key}'" + end break end context.response.status_code = found ? 204 : 404