summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-07-15 10:40:41 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-07-15 10:40:41 +0100
commita5dbf0a0aa13d0868f37fd94e72a1d0434e885e6 (patch)
tree959b51b220e33d4545aed52fef17f31cb6b24cdd
parent2869d77ab9bbaceaf55234a140f9b1f83f663e67 (diff)
downloadrabbitmq-server-git-a5dbf0a0aa13d0868f37fd94e72a1d0434e885e6.tar.gz
renamed variables; alligned code
-rw-r--r--src/rabbit_access_control.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl
index 5eb80325db..bebaef8e55 100644
--- a/src/rabbit_access_control.erl
+++ b/src/rabbit_access_control.erl
@@ -318,12 +318,12 @@ set_permissions(Username, VHostPath, ConfigurePerm, WritePerm, ReadPerm) ->
set_permissions(<<"client">>, Username, VHostPath, ConfigurePerm,
WritePerm, ReadPerm).
-set_permissions(Scope, Username, VHostPath, ConfigurePerm, WritePerm, ReadPerm) ->
+set_permissions(ScopeBin, Username, VHostPath, ConfigurePerm, WritePerm, ReadPerm) ->
lists:map(fun validate_regexp/1, [ConfigurePerm, WritePerm, ReadPerm]),
- Scope1 = case Scope of
+ Scope = case ScopeBin of
<<"client">> -> client;
- <<"all">> -> all;
- _ -> throw({error, {invalid_scope, Scope}})
+ <<"all">> -> all;
+ _ -> throw({error, {invalid_scope, ScopeBin}})
end,
rabbit_misc:execute_mnesia_transaction(
rabbit_misc:with_user_and_vhost(
@@ -334,7 +334,7 @@ set_permissions(Scope, Username, VHostPath, ConfigurePerm, WritePerm, ReadPerm)
username = Username,
virtual_host = VHostPath},
permission = #permission{
- scope = Scope1,
+ scope = Scope,
configure = ConfigurePerm,
write = WritePerm,
read = ReadPerm}},