Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2016-06-21 13:28:53 +0300
committerPaweł Chmielowski <pchmielowski@process-one.net>2016-06-21 13:28:53 +0300
commit52d45604ba705bdf029eda6c7b39622b8f2a8ebe (patch)
treead46a4ec333e78ca93559abad75063d92e7f88eb /src/mod_http_api.erl
parent804190e4a899a1f7b05f1161490c5d151acde6f2 (diff)
Use new access_rules_validator in couple places
Diffstat (limited to 'src/mod_http_api.erl')
-rw-r--r--src/mod_http_api.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mod_http_api.erl b/src/mod_http_api.erl
index 1962e1d0e..aadf09974 100644
--- a/src/mod_http_api.erl
+++ b/src/mod_http_api.erl
@@ -173,7 +173,7 @@ check_permissions2(_Request, Call, open) ->
{allowed, Call, noauth};
check_permissions2(#request{ip={IP, _Port}}, Call, _Policy) ->
Access = gen_mod:get_module_opt(global, ?MODULE, admin_ip_access,
- mod_opt_type(admin_ip_access),
+ fun(V) -> V end,
none),
Res = acl:match_rule(global, Access, IP),
case Res of
@@ -502,6 +502,5 @@ log(Call, Args, {Addr, Port}) ->
log(Call, Args, IP) ->
?INFO_MSG("API call ~s ~p (~p)", [Call, Args, IP]).
-mod_opt_type(admin_ip_access) ->
- fun(Access) when is_atom(Access) -> Access end;
+mod_opt_type(admin_ip_access) -> fun acl:access_rules_validator/1;
mod_opt_type(_) -> [admin_ip_access].