summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2013-05-30 16:37:14 +0100
committerSimon MacMullen <simon@rabbitmq.com>2013-05-30 16:37:14 +0100
commitbc7d5a6d84b788e209fc529b0a780f810890332e (patch)
tree34faae1b5ed59fe8c7ee5a04f0105442b6387190 /src
parent1ad39bfc97bcff4256e15963382a1083fb215ae5 (diff)
downloadrabbitmq-server-git-bc7d5a6d84b788e209fc529b0a780f810890332e.tar.gz
Don't use andalso here, it breaks LDAP when compiled under R12.
Diffstat (limited to 'src')
-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 1638726863..cbe89a17a1 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],