diff options
author | feld <feld@feld.me> | 2020-11-11 16:15:57 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2020-11-11 16:15:57 +0000 |
commit | 911fc3c523f1dfb4155458375ffc0995804b9e76 (patch) | |
tree | b5bab89d4caea9041292ba35140da3a0b20badd3 | |
parent | 3cd7ea693fa820c04257b893725100eccf1cc96c (diff) | |
parent | 8da9f919f82ac45c4519910a7e24cac2b797061f (diff) | |
download | pleroma-911fc3c523f1dfb4155458375ffc0995804b9e76.tar.gz pleroma-911fc3c523f1dfb4155458375ffc0995804b9e76.zip |
Merge branch 'mrf-config-descriptions' into 'develop'
little changes for MRF config descriptions
See merge request pleroma/pleroma!3131
-rw-r--r-- | docs/dev.md | 23 | ||||
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf.ex | 2 |
2 files changed, 24 insertions, 1 deletions
diff --git a/docs/dev.md b/docs/dev.md index 22e0691f1..aa89a941f 100644 --- a/docs/dev.md +++ b/docs/dev.md @@ -21,3 +21,26 @@ This document contains notes and guidelines for Pleroma developers. ## Auth-related configuration, OAuth consumer mode etc. 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] + } + ] + } +``` diff --git a/lib/pleroma/web/activity_pub/mrf.ex b/lib/pleroma/web/activity_pub/mrf.ex index ce125a696..6e73b2f22 100644 --- a/lib/pleroma/web/activity_pub/mrf.ex +++ b/lib/pleroma/web/activity_pub/mrf.ex @@ -164,7 +164,7 @@ defmodule Pleroma.Web.ActivityPub.MRF do acc end else - Logger.info( + Logger.debug( "#{policy} is excluded from config descriptions, because does not implement `config_description/0` method." ) |