summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-25 11:44:51 +0200
committerlain <lain@soykaf.club>2020-08-25 11:44:51 +0200
commitc1d51944c71ff90650b1a631241daf0d8be5b861 (patch)
tree2e78efaeb892c4b09cac0439f268d6a60637b4dc /config
parent199ad47c22e5d72741f5809eb015bac9b00cca03 (diff)
parent5722b0e2e5e7113f0422798a6ea8cc40d1953291 (diff)
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into frontend-bundles-downloads
Diffstat (limited to 'config')
-rw-r--r--config/config.exs23
-rw-r--r--config/description.exs98
-rw-r--r--config/test.exs5
3 files changed, 85 insertions, 41 deletions
diff --git a/config/config.exs b/config/config.exs
index 317aa0f04..246712b9f 100644
--- a/config/config.exs
+++ b/config/config.exs
@@ -72,7 +72,8 @@ config :pleroma, Pleroma.Upload,
pool: :upload
]
],
- filename_display_max_length: 30
+ filename_display_max_length: 30,
+ default_description: nil
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
@@ -515,7 +516,13 @@ config :pleroma, Pleroma.User,
"user-search",
"user_exists",
"users",
- "web"
+ "web",
+ "verify_credentials",
+ "update_credentials",
+ "relationships",
+ "search",
+ "confirmation_resend",
+ "mfa"
],
email_blacklist: []
@@ -762,10 +769,12 @@ config :pleroma, :hackney_pools,
timeout: 300_000
]
+private_instance? = :if_instance_is_private
+
config :pleroma, :restrict_unauthenticated,
- timelines: %{local: false, federated: false},
- profiles: %{local: false, remote: false},
- activities: %{local: false, remote: false}
+ timelines: %{local: private_instance?, federated: private_instance?},
+ profiles: %{local: private_instance?, remote: private_instance?},
+ activities: %{local: private_instance?, remote: private_instance?}
config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
@@ -780,6 +789,10 @@ config :ex_aws, http_client: Pleroma.HTTP.ExAws
config :pleroma, :instances_favicons, enabled: false
+config :floki, :html_parser, Floki.HTMLParser.FastHtml
+
+config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
+
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env()}.exs"
diff --git a/config/description.exs b/config/description.exs
index c7c8524dd..c50910911 100644
--- a/config/description.exs
+++ b/config/description.exs
@@ -15,13 +15,17 @@ websocket_config = [
frontend_options = [
%{
key: "name",
+ label: "Name",
type: :string,
- description: "Name of the installed Admin frontend"
+ description:
+ "Name of the frontend. Valid config must include both `Name` and `Reference` values."
},
%{
key: "ref",
+ label: "Reference",
type: :string,
- description: "reference of the installed Admin frontend to be used"
+ description:
+ "Reference of the frontend to be used. Valid config must include both `Name` and `Reference` values."
},
%{
key: "git",
@@ -224,7 +228,7 @@ config :pleroma, :config_description, [
type: [:string, {:list, :string}, {:list, :tuple}],
description:
"List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
- "For example `[\"auto-orient\", \"strip\", {\"resize\", \"3840x1080>\"}]` string will be parsed into list of the settings.",
+ "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
suggestions: [
"strip",
"auto-orient",
@@ -981,7 +985,7 @@ config :pleroma, :config_description, [
},
%{
key: :instance_thumbnail,
- type: :string,
+ type: {:string, :image},
description:
"The instance thumbnail can be any image that represents your instance and is used by some apps or services when they display information about your instance.",
suggestions: ["/instance/thumbnail.jpeg"]
@@ -994,25 +998,25 @@ config :pleroma, :config_description, [
]
},
%{
- group: :welcome,
+ group: :pleroma,
+ key: :welcome,
type: :group,
description: "Welcome messages settings",
children: [
%{
- group: :direct_message,
- type: :group,
+ key: :direct_message,
+ type: :keyword,
descpiption: "Direct message settings",
children: [
%{
key: :enabled,
type: :boolean,
- description: "Enables sends direct message for new user after registration"
+ description: "Enables sending a direct message to newly registered users"
},
%{
key: :message,
type: :string,
- description:
- "A message that will be sent to a newly registered users as a direct message",
+ description: "A message that will be sent to newly registered users",
suggestions: [
"Hi, @username! Welcome on board!"
]
@@ -1020,7 +1024,7 @@ config :pleroma, :config_description, [
%{
key: :sender_nickname,
type: :string,
- description: "The nickname of the local user that sends the welcome message",
+ description: "The nickname of the local user that sends a welcome message",
suggestions: [
"lain"
]
@@ -1028,20 +1032,20 @@ config :pleroma, :config_description, [
]
},
%{
- group: :chat_message,
- type: :group,
+ key: :chat_message,
+ type: :keyword,
descpiption: "Chat message settings",
children: [
%{
key: :enabled,
type: :boolean,
- description: "Enables sends chat message for new user after registration"
+ description: "Enables sending a chat message to newly registered users"
},
%{
key: :message,
type: :string,
description:
- "A message that will be sent to a newly registered users as a chat message",
+ "A message that will be sent to newly registered users as a chat message",
suggestions: [
"Hello, welcome on board!"
]
@@ -1049,7 +1053,7 @@ config :pleroma, :config_description, [
%{
key: :sender_nickname,
type: :string,
- description: "The nickname of the local user that sends the welcome message",
+ description: "The nickname of the local user that sends a welcome chat message",
suggestions: [
"lain"
]
@@ -1057,20 +1061,20 @@ config :pleroma, :config_description, [
]
},
%{
- group: :email,
- type: :group,
+ key: :email,
+ type: :keyword,
descpiption: "Email message settings",
children: [
%{
key: :enabled,
type: :boolean,
- description: "Enables sends direct message for new user after registration"
+ description: "Enables sending an email to newly registered users"
},
%{
key: :sender,
type: [:string, :tuple],
description:
- "The email address or tuple with `{nickname, email}` that will use as sender to the welcome email.",
+ "Email address and/or nickname that will be used to send the welcome email.",
suggestions: [
{"Pleroma App", "welcome@pleroma.app"}
]
@@ -1079,21 +1083,21 @@ config :pleroma, :config_description, [
key: :subject,
type: :string,
description:
- "The subject of welcome email. Can be use EEX template with `user` and `instance_name` variables.",
+ "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
suggestions: ["Welcome to <%= instance_name%>"]
},
%{
key: :html,
type: :string,
description:
- "The html content of welcome email. Can be use EEX template with `user` and `instance_name` variables.",
+ "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
},
%{
key: :text,
type: :string,
description:
- "The text content of welcome email. Can be use EEX template with `user` and `instance_name` variables.",
+ "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
}
]
@@ -1266,7 +1270,7 @@ config :pleroma, :config_description, [
},
%{
key: :background,
- type: :string,
+ type: {:string, :image},
description:
"URL of the background, unless viewing a user profile with a background that is set",
suggestions: ["/images/city.jpg"]
@@ -1323,7 +1327,7 @@ config :pleroma, :config_description, [
},
%{
key: :logo,
- type: :string,
+ type: {:string, :image},
description: "URL of the logo, defaults to Pleroma's logo",
suggestions: ["/static/logo.png"]
},
@@ -1355,7 +1359,7 @@ config :pleroma, :config_description, [
%{
key: :nsfwCensorImage,
label: "NSFW Censor Image",
- type: :string,
+ type: {:string, :image},
description:
"URL of the image to use for hiding NSFW media attachments in the timeline",
suggestions: ["/static/img/nsfw.74818f9.png"]
@@ -1481,7 +1485,7 @@ config :pleroma, :config_description, [
},
%{
key: :default_user_avatar,
- type: :string,
+ type: {:string, :image},
description: "URL of the default user avatar",
suggestions: ["/images/avi.png"]
}
@@ -1840,12 +1844,12 @@ config :pleroma, :config_description, [
%{
key: :enabled,
type: :boolean,
- description: "Enables invalidate media cache"
+ description: "Enables media cache object invalidation."
},
%{
key: :provider,
type: :module,
- description: "Module which will be used to cache purge.",
+ description: "Module which will be used to purge objects from the cache.",
suggestions: [
Pleroma.Web.MediaProxy.Invalidation.Script,
Pleroma.Web.MediaProxy.Invalidation.Http
@@ -2672,7 +2676,7 @@ config :pleroma, :config_description, [
children: [
%{
key: :logo,
- type: :string,
+ type: {:string, :image},
description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
suggestions: ["some/path/logo.png"]
},
@@ -3329,13 +3333,13 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :connections_pool,
type: :group,
- description: "Advanced settings for `gun` connections pool",
+ description: "Advanced settings for `Gun` connections pool",
children: [
%{
key: :connection_acquisition_wait,
type: :integer,
description:
- "Timeout to acquire a connection from pool.The total max time is this value multiplied by the number of retries. Default: 250ms.",
+ "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
suggestions: [250]
},
%{
@@ -3370,7 +3374,7 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :pools,
type: :group,
- description: "Advanced settings for `gun` workers pools",
+ description: "Advanced settings for `Gun` workers pools",
children:
Enum.map([:federation, :media, :upload, :default], fn pool_name ->
%{
@@ -3399,7 +3403,7 @@ config :pleroma, :config_description, [
group: :pleroma,
key: :hackney_pools,
type: :group,
- description: "Advanced settings for `hackney` connections pools",
+ description: "Advanced settings for `Hackney` connections pools",
children: [
%{
key: :federation,
@@ -3463,6 +3467,7 @@ config :pleroma, :config_description, [
%{
group: :pleroma,
key: :restrict_unauthenticated,
+ label: "Restrict Unauthenticated",
type: :group,
description:
"Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
@@ -3593,7 +3598,30 @@ config :pleroma, :config_description, [
%{
key: :available,
type: :map,
- description: "A map containing available frontends and parameters for their installation."
+ description:
+ "A map containing available frontends and parameters for their installation.",
+ children: [
+ frontend_options
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.Preload,
+ type: :group,
+ description: "Preload-related settings",
+ children: [
+ %{
+ key: :providers,
+ type: {:list, :module},
+ description: "List of preload providers to enable",
+ suggestions: [
+ Pleroma.Web.Preload.Providers.Instance,
+ Pleroma.Web.Preload.Providers.User,
+ Pleroma.Web.Preload.Providers.Timelines,
+ Pleroma.Web.Preload.Providers.StatusNet
+ ]
}
]
}
diff --git a/config/test.exs b/config/test.exs
index 413c7f0b9..f0358e384 100644
--- a/config/test.exs
+++ b/config/test.exs
@@ -21,7 +21,10 @@ config :logger, :console,
config :pleroma, :auth, oauth_consumer_strategies: []
-config :pleroma, Pleroma.Upload, filters: [], link_name: false
+config :pleroma, Pleroma.Upload,
+ filters: [],
+ link_name: false,
+ default_description: :filename
config :pleroma, Pleroma.Uploaders.Local, uploads: "test/uploads"