mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Correctly convert ACLs into YAML representation
This commit is contained in:
parent
a87b475361
commit
89a17ba84a
32
src/acl.erl
32
src/acl.erl
@ -455,22 +455,22 @@ transform_options({acl, Name, Type}, Opts) ->
|
|||||||
T = case Type of
|
T = case Type of
|
||||||
all -> all;
|
all -> all;
|
||||||
none -> none;
|
none -> none;
|
||||||
{user, U} -> {user, [U]};
|
{user, U} -> {user, [b(U)]};
|
||||||
{user, U, S} -> {user, [[{U, S}]]};
|
{user, U, S} -> {user, [[{b(U), b(S)}]]};
|
||||||
{shared_group, G} -> {shared_group, [G]};
|
{shared_group, G} -> {shared_group, [b(G)]};
|
||||||
{shared_group, G, H} -> {shared_group, [[{G, H}]]};
|
{shared_group, G, H} -> {shared_group, [[{b(G), b(H)}]]};
|
||||||
{user_regexp, UR} -> {user_regexp, [UR]};
|
{user_regexp, UR} -> {user_regexp, [b(UR)]};
|
||||||
{user_regexp, UR, S} -> {user_regexp, [[{UR, S}]]};
|
{user_regexp, UR, S} -> {user_regexp, [[{b(UR), b(S)}]]};
|
||||||
{node_regexp, UR, SR} -> {node_regexp, [[{UR, SR}]]};
|
{node_regexp, UR, SR} -> {node_regexp, [[{b(UR), b(SR)}]]};
|
||||||
{user_glob, UR} -> {user_glob, [UR]};
|
{user_glob, UR} -> {user_glob, [b(UR)]};
|
||||||
{user_glob, UR, S} -> {user_glob, [[{UR, S}]]};
|
{user_glob, UR, S} -> {user_glob, [[{b(UR), b(S)}]]};
|
||||||
{node_glob, UR, SR} -> {node_glob, [[{UR, SR}]]};
|
{node_glob, UR, SR} -> {node_glob, [[{b(UR), b(SR)}]]};
|
||||||
{server, S} -> {server, [S]};
|
{server, S} -> {server, [b(S)]};
|
||||||
{resource, R} -> {resource, [R]};
|
{resource, R} -> {resource, [b(R)]};
|
||||||
{server_regexp, SR} -> {server_regexp, [SR]};
|
{server_regexp, SR} -> {server_regexp, [b(SR)]};
|
||||||
{server_glob, S} -> {server_glob, [S]};
|
{server_glob, S} -> {server_glob, [b(S)]};
|
||||||
{ip, S} -> {ip, [S]};
|
{ip, S} -> {ip, [b(S)]};
|
||||||
{resource_glob, R} -> {resource_glob, [R]}
|
{resource_glob, R} -> {resource_glob, [b(R)]}
|
||||||
end,
|
end,
|
||||||
[{acl, [{Name, [T]}]}|Opts];
|
[{acl, [{Name, [T]}]}|Opts];
|
||||||
transform_options({access, Name, Rules}, Opts) ->
|
transform_options({access, Name, Rules}, Opts) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user