Explicitly allow configDB keys #628
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
|
||||
- Full compatibility with Erlang OTP26
|
||||
- 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
|
||||
- OTP builds are now built on erlang OTP26
|
||||
|
|
|
@ -319,6 +319,9 @@ defp do_migrate_to_db(config_file) do
|
|||
defp create(group, settings) do
|
||||
group
|
||||
|> Pleroma.Config.Loader.filter_group(settings)
|
||||
|> Enum.filter(fn {key, _value} ->
|
||||
Pleroma.Config.ConfigurableFromDatabase.whitelisted_config?(group, key)
|
||||
end)
|
||||
|> Enum.each(fn {key, value} ->
|
||||
{:ok, _} = ConfigDB.update_or_create(%{group: group, key: key, value: value})
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ defp merge_with_default(%{group: group, key: key, value: value} = setting) do
|
|||
MIX: mix pleroma.config delete #{group} #{key}
|
||||
OTP: ./bin/pleroma_ctl config delete #{group} #{key}
|
||||
and setting it in your .exs file instead
|
||||
config #{inspect(group)}, #{inspect(key)}, #{inspect(value)}
|
||||
])
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue