Просмотр исходного кода

chore(authz): make `authorization.cache.enable` required

JianBo He 3 лет назад
Родитель
Сommit
03967a83de
2 измененных файлов с 1 добавлено и 1 удалено
  1. 1 0
      apps/emqx/src/emqx_schema.erl
  2. 0 1
      apps/emqx_authz/src/emqx_authz_api_settings.erl

+ 1 - 0
apps/emqx/src/emqx_schema.erl

@@ -344,6 +344,7 @@ fields("cache") ->
                 boolean(),
                 #{
                     default => true,
+                    required => true,
                     desc => ?DESC(fields_cache_enable)
                 }
             )},

+ 0 - 1
apps/emqx_authz/src/emqx_authz_api_settings.erl

@@ -80,7 +80,6 @@ settings(put, #{
         [authorization, deny_action], DenyAction
     ),
     {ok, _} = emqx_authz_utils:update_config([authorization, cache], Cache),
-    ok = emqx_authz_cache:drain_cache(),
     {200, authorization_settings()}.
 
 authorization_settings() ->