Merge branch 'mrf-config-descriptions' into 'develop'
little changes for MRF config descriptions See merge request pleroma/pleroma!3131
This commit is contained in:
commit
911fc3c523
23
docs/dev.md
23
docs/dev.md
|
@ -21,3 +21,26 @@ This document contains notes and guidelines for Pleroma developers.
|
||||||
## Auth-related configuration, OAuth consumer mode etc.
|
## Auth-related configuration, OAuth consumer mode etc.
|
||||||
|
|
||||||
See `Authentication` section of [the configuration cheatsheet](configuration/cheatsheet.md#authentication).
|
See `Authentication` section of [the configuration cheatsheet](configuration/cheatsheet.md#authentication).
|
||||||
|
|
||||||
|
## MRF policies descriptions
|
||||||
|
|
||||||
|
If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns map with special structure.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
%{
|
||||||
|
key: :mrf_activity_expiration,
|
||||||
|
related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
|
||||||
|
label: "MRF Activity Expiration Policy",
|
||||||
|
description: "Adds automatic expiration to all local activities",
|
||||||
|
children: [
|
||||||
|
%{
|
||||||
|
key: :days,
|
||||||
|
type: :integer,
|
||||||
|
description: "Default global expiration time for all local activities (in days)",
|
||||||
|
suggestions: [90, 365]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
|
@ -164,7 +164,7 @@ def config_descriptions(policies) do
|
||||||
acc
|
acc
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Logger.info(
|
Logger.debug(
|
||||||
"#{policy} is excluded from config descriptions, because does not implement `config_description/0` method."
|
"#{policy} is excluded from config descriptions, because does not implement `config_description/0` method."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue