summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_access_control.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl
index 16387268..cbe89a17 100644
--- a/src/rabbit_access_control.erl
+++ b/src/rabbit_access_control.erl
@@ -68,8 +68,11 @@ check_vhost_access(User = #user{ username = Username,
auth_backend = Module }, VHostPath) ->
check_access(
fun() ->
- rabbit_vhost:exists(VHostPath) andalso
- Module:check_vhost_access(User, VHostPath)
+ %% TODO this could be an andalso shortcut under >R13A
+ case rabbit_vhost:exists(VHostPath) of
+ false -> false;
+ true -> Module:check_vhost_access(User, VHostPath)
+ end
end,
"~s failed checking vhost access to ~s for ~s: ~p~n",
[Module, VHostPath, Username],