Add warning for config that probably shouldn't be in the DB
This commit is contained in:
parent
a5bc622970
commit
16512acc3b
3 changed files with 7 additions and 0 deletions
|
@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
## Added
|
## Added
|
||||||
- Full compatibility with Erlang OTP26
|
- Full compatibility with Erlang OTP26
|
||||||
- handling of GET /api/v1/preferences
|
- handling of GET /api/v1/preferences
|
||||||
|
- Explicit listing of config keys that are allowed to be set by the database
|
||||||
|
- Previously set config keys will still be loaded, but you will get a warning
|
||||||
|
that they probably should not be dynamically configured.
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
- OTP builds are now built on erlang OTP26
|
- OTP builds are now built on erlang OTP26
|
||||||
|
|
|
@ -319,6 +319,9 @@ defmodule Mix.Tasks.Pleroma.Config do
|
||||||
defp create(group, settings) do
|
defp create(group, settings) do
|
||||||
group
|
group
|
||||||
|> Pleroma.Config.Loader.filter_group(settings)
|
|> Pleroma.Config.Loader.filter_group(settings)
|
||||||
|
|> Enum.filter(fn {key, _value} ->
|
||||||
|
Pleroma.Config.ConfigurableFromDatabase.whitelisted_config?(group, key)
|
||||||
|
end)
|
||||||
|> Enum.each(fn {key, value} ->
|
|> Enum.each(fn {key, value} ->
|
||||||
{:ok, _} = ConfigDB.update_or_create(%{group: group, key: key, value: value})
|
{:ok, _} = ConfigDB.update_or_create(%{group: group, key: key, value: value})
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,7 @@ defmodule Pleroma.Config.TransferTask do
|
||||||
MIX: mix pleroma.config delete #{group} #{key}
|
MIX: mix pleroma.config delete #{group} #{key}
|
||||||
OTP: ./bin/pleroma_ctl config delete #{group} #{key}
|
OTP: ./bin/pleroma_ctl config delete #{group} #{key}
|
||||||
and setting it in your .exs file instead
|
and setting it in your .exs file instead
|
||||||
|
config #{inspect(group)}, #{inspect(key)}, #{inspect(value)}
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue