aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_server/mod_security.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-05-22 14:18:46 +0200
committerIngela Anderton Andin <[email protected]>2015-06-04 10:47:35 +0200
commit855c9bb101ed6fc5a3965d1ff0e18c04a346e9cd (patch)
tree72adfb221c2801f7088f1b7c81d8fe1542a171c2 /lib/inets/src/http_server/mod_security.erl
parentfdfda2fab0921d409789174556582db28141448e (diff)
downloadotp-855c9bb101ed6fc5a3965d1ff0e18c04a346e9cd.tar.gz
otp-855c9bb101ed6fc5a3965d1ff0e18c04a346e9cd.tar.bz2
otp-855c9bb101ed6fc5a3965d1ff0e18c04a346e9cd.zip
inets: Modernize code
* Remove debug macros that mimics call trace. * Remove comments that does not add value. * Structure code
Diffstat (limited to 'lib/inets/src/http_server/mod_security.erl')
-rw-r--r--lib/inets/src/http_server/mod_security.erl23
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/inets/src/http_server/mod_security.erl b/lib/inets/src/http_server/mod_security.erl
index 57de907267..a85383a921 100644
--- a/lib/inets/src/http_server/mod_security.erl
+++ b/lib/inets/src/http_server/mod_security.erl
@@ -35,8 +35,9 @@
-define(VMODULE,"SEC").
-
-%% do/1
+%%====================================================================
+%% Internal application API
+%%====================================================================
do(Info) ->
%% Check and see if any user has been authorized.
case proplists:get_value(remote_user, Info#mod.data,not_defined_user) of
@@ -181,12 +182,6 @@ remove(ConfigDB) ->
mod_security_server:stop(Addr, Port, Profile).
-%%
-%% User API
-%%
-
-%% list_blocked_users
-
list_blocked_users(Port) ->
list_blocked_users(undefined, Port).
@@ -204,17 +199,11 @@ list_blocked_users(Addr, Port, Dir) ->
end,
mod_security_server:list_blocked_users(Addr, Port, Dir)).
-
-%% block_user
-
block_user(User, Port, Dir, Time) ->
block_user(User, undefined, Port, Dir, Time).
block_user(User, Addr, Port, Dir, Time) ->
mod_security_server:block_user(User, Addr, Port, Dir, Time).
-
-%% unblock_user
-
unblock_user(User, Port) ->
unblock_user(User, undefined, Port).
@@ -226,9 +215,6 @@ unblock_user(User, Addr, Port) when is_integer(Port) ->
unblock_user(User, Addr, Port, Dir) ->
mod_security_server:unblock_user(User, Addr, Port, Dir).
-
-%% list_auth_users
-
list_auth_users(Port) ->
list_auth_users(undefined,Port).
@@ -312,6 +298,3 @@ load_return_int_tag(Name, Atom, Time, Dir, DirData) ->
{ok, [{security_directory, {Dir, [{Atom, Val}|DirData]}}]}
end
end.
-
-
-