summaryrefslogtreecommitdiff
path: root/docs/configuration/mrf.md
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-04-29 11:14:32 -0500
committerAlex Gleason <alex@alexgleason.me>2021-04-29 11:14:32 -0500
commit762be6ce10d2145e8e31d42c5d1a0bab93dbe7b0 (patch)
tree0416ef7020ba2b333cb223200d7108928f714fde /docs/configuration/mrf.md
parentb7b05a074867c1444dd539d6d2331f6d5504f6e6 (diff)
parent115673bce773f91630c3bd4fd2d0023f92bee163 (diff)
downloadpleroma-762be6ce10d2145e8e31d42c5d1a0bab93dbe7b0.tar.gz
pleroma-762be6ce10d2145e8e31d42c5d1a0bab93dbe7b0.zip
Merge remote-tracking branch 'upstream/develop' into block-behavior
Diffstat (limited to 'docs/configuration/mrf.md')
-rw-r--r--docs/configuration/mrf.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/configuration/mrf.md b/docs/configuration/mrf.md
index 31c66e098..9e8c0a2d7 100644
--- a/docs/configuration/mrf.md
+++ b/docs/configuration/mrf.md
@@ -133,3 +133,26 @@ config :pleroma, :mrf,
```
Please note that the Pleroma developers consider custom MRF policy modules to fall under the purview of the AGPL. As such, you are obligated to release the sources to your custom MRF policy modules upon request.
+
+### 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 a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the adminFE and just adding it to `config_description/0` may not be enough to get these inputs working from the adminFE.
+
+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]
+ }
+ ]
+ }
+```