|
30 | 30 | -export([args_hash/1]).
|
31 | 31 |
|
32 | 32 | -import(rabbit_misc, [pget/2, pget/3, pset/3]).
|
| 33 | +-import(rabbit_data_coercion, [to_binary/1]). |
33 | 34 |
|
34 | 35 | -include_lib("rabbit_common/include/rabbit.hrl").
|
35 | 36 | -include_lib("rabbit_common/include/rabbit_framing.hrl").
|
@@ -215,15 +216,16 @@ internal_user(User) ->
|
215 | 216 | {password_hash, base64:encode(internal_user:get_password_hash(User))},
|
216 | 217 | {hashing_algorithm, rabbit_auth_backend_internal:hashing_module_for_user(
|
217 | 218 | User)},
|
218 |
| - {tags, tags(internal_user:get_tags(User))}, |
| 219 | + {tags, tags_as_binaries(internal_user:get_tags(User))}, |
219 | 220 | {limits, internal_user:get_limits(User)}].
|
220 | 221 |
|
221 | 222 | user(User) ->
|
222 | 223 | [{name, User#user.username},
|
223 |
| - {tags, tags(User#user.tags)}]. |
| 224 | + {tags, tags_as_binaries(User#user.tags)}]. |
| 225 | + |
| 226 | +tags_as_binaries(Tags) -> |
| 227 | + [to_binary(T) || T <- Tags]. |
224 | 228 |
|
225 |
| -tags(Tags) -> |
226 |
| - list_to_binary(string:join([atom_to_list(T) || T <- Tags], ",")). |
227 | 229 |
|
228 | 230 | listener(#listener{node = Node, protocol = Protocol,
|
229 | 231 | ip_address = IPAddress, port = Port, opts=Opts}) ->
|
|
0 commit comments