mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-02 21:17:12 +02:00
Invalidate access permissions on configuration reload
This commit is contained in:
parent
933351ab4c
commit
d523357ba8
|
@ -109,6 +109,7 @@ start_link() ->
|
||||||
{ok, State :: #state{}} | {ok, State :: #state{}, timeout() | hibernate} |
|
{ok, State :: #state{}} | {ok, State :: #state{}, timeout() | hibernate} |
|
||||||
{stop, Reason :: term()} | ignore.
|
{stop, Reason :: term()} | ignore.
|
||||||
init([]) ->
|
init([]) ->
|
||||||
|
ejabberd_hooks:add(config_reloaded, ?MODULE, invalidate, 90),
|
||||||
{ok, #state{}}.
|
{ok, #state{}}.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
@ -209,7 +210,7 @@ handle_info(_Info, State) ->
|
||||||
-spec terminate(Reason :: (normal | shutdown | {shutdown, term()} | term()),
|
-spec terminate(Reason :: (normal | shutdown | {shutdown, term()} | term()),
|
||||||
State :: #state{}) -> term().
|
State :: #state{}) -> term().
|
||||||
terminate(_Reason, _State) ->
|
terminate(_Reason, _State) ->
|
||||||
ok.
|
ejabberd_hooks:delete(config_reloaded, ?MODULE, invalidate, 90).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% @private
|
%% @private
|
||||||
|
|
|
@ -497,10 +497,7 @@ registered_vhosts() ->
|
||||||
?MYHOSTS.
|
?MYHOSTS.
|
||||||
|
|
||||||
reload_config() ->
|
reload_config() ->
|
||||||
ejabberd_config:reload_file(),
|
ejabberd_config:reload_file().
|
||||||
%% TODO: Move this to ejabberd_access_permissions.erl and put on hook
|
|
||||||
%% This requires ejabberd_access_permissions to start after ejabberd_hooks
|
|
||||||
ejabberd_access_permissions:invalidate().
|
|
||||||
|
|
||||||
%%%
|
%%%
|
||||||
%%% Cluster management
|
%%% Cluster management
|
||||||
|
|
Loading…
Reference in New Issue
Block a user