24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-10 21:47:01 +02:00

Fix display ACLs in WebAdmin

This commit is contained in:
Badlop 2013-10-01 23:23:01 +02:00
parent f2f2f64161
commit cd0381bab5

View File

@ -1004,24 +1004,24 @@ acls_to_xhtml(ACLs) ->
[?INPUT(<<"text">>, <<"namenew">>, <<"">>)])] [?INPUT(<<"text">>, <<"namenew">>, <<"">>)])]
++ acl_spec_to_xhtml(<<"new">>, {user, <<"">>})))]))]). ++ acl_spec_to_xhtml(<<"new">>, {user, <<"">>})))]))]).
acl_spec_to_text({user, {U, S}}) ->
{user, <<U/binary, "@", S/binary>>};
acl_spec_to_text({user, U}) -> {user, U}; acl_spec_to_text({user, U}) -> {user, U};
acl_spec_to_text({server, S}) -> {server, S}; acl_spec_to_text({server, S}) -> {server, S};
acl_spec_to_text({user, U, S}) -> acl_spec_to_text({user_regexp, {RU, S}}) ->
{user, <<U/binary, "@", S/binary>>}; {user_regexp, <<RU/binary, "@", S/binary>>};
acl_spec_to_text({user_regexp, RU}) -> acl_spec_to_text({user_regexp, RU}) ->
{user_regexp, RU}; {user_regexp, RU};
acl_spec_to_text({user_regexp, RU, S}) ->
{user_regexp, <<RU/binary, "@", S/binary>>};
acl_spec_to_text({server_regexp, RS}) -> acl_spec_to_text({server_regexp, RS}) ->
{server_regexp, RS}; {server_regexp, RS};
acl_spec_to_text({node_regexp, RU, RS}) -> acl_spec_to_text({node_regexp, {RU, RS}}) ->
{node_regexp, <<RU/binary, "@", RS/binary>>}; {node_regexp, <<RU/binary, "@", RS/binary>>};
acl_spec_to_text({user_glob, RU}) -> {user_glob, RU}; acl_spec_to_text({user_glob, {RU, S}}) ->
acl_spec_to_text({user_glob, RU, S}) ->
{user_glob, <<RU/binary, "@", S/binary>>}; {user_glob, <<RU/binary, "@", S/binary>>};
acl_spec_to_text({user_glob, RU}) -> {user_glob, RU};
acl_spec_to_text({server_glob, RS}) -> acl_spec_to_text({server_glob, RS}) ->
{server_glob, RS}; {server_glob, RS};
acl_spec_to_text({node_glob, RU, RS}) -> acl_spec_to_text({node_glob, {RU, RS}}) ->
{node_glob, <<RU/binary, "@", RS/binary>>}; {node_glob, <<RU/binary, "@", RS/binary>>};
acl_spec_to_text(all) -> {all, <<"">>}; acl_spec_to_text(all) -> {all, <<"">>};
acl_spec_to_text(Spec) -> {raw, term_to_string(Spec)}. acl_spec_to_text(Spec) -> {raw, term_to_string(Spec)}.