Skip to content

Commit

Permalink
satisfy ameba 1.6.4 lint (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 committed Dec 16, 2024
1 parent 4614bb3 commit 4ef9ea1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/lavinmq/http/controller.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/lavinmq/http/controller/bindings.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ef9ea1

Please sign in to comment.