aboutsummaryrefslogtreecommitdiff
path: root/docs/configuration/mrf.md
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2021-01-18 11:56:40 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2021-01-18 11:56:40 +0300
commit2289a1d58777b8ed129e322c3ce4119bc129366c (patch)
tree693af643bfd94af28c29ec519ef8df0f208d7424 /docs/configuration/mrf.md
parentdbaa15232bfe4c2bc3e2b1a17cfc7503e7036d77 (diff)
parent732cc0ce46e8044909dd5205858c43f75fe3e937 (diff)
downloadpleroma-2289a1d58777b8ed129e322c3ce4119bc129366c.tar.gz
Merge branch 'develop' into refactor/uploads
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]
+ }
+ ]
+ }
+```