summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <tim@rabbitmq.com>2013-06-06 10:40:01 +0100
committerTim Watson <tim@rabbitmq.com>2013-06-06 10:40:01 +0100
commit727f13f4cb007cf8150342e743b0339ca961c564 (patch)
treedfaa8dca979ae64b474cbe5845589c452723b179
parentdc6796c95a339685a1b68a5f26dd2882f9f5bc57 (diff)
parent0b0da3203790cb851931a167e007f59c608d586a (diff)
downloadrabbitmq-server-727f13f4cb007cf8150342e743b0339ca961c564.tar.gz
merge stable into default
-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 5b92a5c3..b4179ec5 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,
Module, "access to vhost '~s' refused for user '~s'",
[VHostPath, Username]).