summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rabbit_auth_backend_internal.erl16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/rabbit_auth_backend_internal.erl b/src/rabbit_auth_backend_internal.erl
index 6a018bd16d..6ae48e41c5 100644
--- a/src/rabbit_auth_backend_internal.erl
+++ b/src/rabbit_auth_backend_internal.erl
@@ -111,16 +111,12 @@ internal_check_user_login(Username, Fun) ->
end.
check_vhost_access(#user{username = Username}, VHost) ->
- %% TODO: use dirty ops instead
- rabbit_misc:execute_mnesia_transaction(
- fun () ->
- case mnesia:read({rabbit_user_permission,
- #user_vhost{username = Username,
- virtual_host = VHost}}) of
- [] -> false;
- [_R] -> true
- end
- end).
+ case mnesia:dirty_read({rabbit_user_permission,
+ #user_vhost{username = Username,
+ virtual_host = VHost}}) of
+ [] -> false;
+ [_R] -> true
+ end.
check_resource_access(#user{username = Username},
#resource{virtual_host = VHostPath, name = Name},