25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Copy more option explanations from ejabberd Docs site

This commit is contained in:
Badlop 2020-04-08 18:49:41 +02:00
parent aa0ed37034
commit 2febd1c220
12 changed files with 122 additions and 39 deletions

View File

@ -60,32 +60,49 @@ doc() ->
#{value => "timeout()", #{value => "timeout()",
desc => desc =>
?T("The time of a cached item to keep in cache. " ?T("The time of a cached item to keep in cache. "
"Once it's expired, the corresponding item is " "Once it's expired, the corresponding item is "
"erased from cache. The default value is 'one hour'.")}}, "erased from cache. The default value is 'one hour'. "
"Several modules have a similar option; and some core "
"ejabberd parts support similar options too, see "
"'auth_cache_life_time', 'oauth_cache_life_time', "
"'router_cache_life_time', and 'sm_cache_life_time'.")}},
{cache_missed, {cache_missed,
#{value => "true | false", #{value => "true | false",
desc => desc =>
?T("Whether or not to cache missed lookups. When there is " ?T("Whether or not to cache missed lookups. When there is "
"an attempt to lookup for a value in a database and " "an attempt to lookup for a value in a database and "
"this value is not found and the option is set to 'true', " "this value is not found and the option is set to 'true', "
"this attempt will be cached and no attempts will be " "this attempt will be cached and no attempts will be "
"performed until the cache expires (see 'cache_life_time'). " "performed until the cache expires (see 'cache_life_time'). "
"Usually you don't want to change it. Default is 'true'.")}}, "Usually you don't want to change it. Default is 'true'. "
"Several modules have a similar option; and some core "
"ejabberd parts support similar options too, see "
"'auth_cache_missed', 'oauth_cache_missed', "
"'router_cache_missed', and 'sm_cache_missed'.")}},
{cache_size, {cache_size,
#{value => "pos_integer() | infinity", #{value => "pos_integer() | infinity",
desc => desc =>
?T("A maximum number of items (not memory!) in cache. " ?T("A maximum number of items (not memory!) in cache. "
"The rule of thumb, for all tables except rosters, " "The rule of thumb, for all tables except rosters, "
"you should set it to the number of maximum online " "you should set it to the number of maximum online "
"users you expect. For roster multiply this number " "users you expect. For roster multiply this number "
"by 20 or so. If the cache size reaches this threshold, " "by 20 or so. If the cache size reaches this threshold, "
"it's fully cleared, i.e. all items are deleted, and " "it's fully cleared, i.e. all items are deleted, and "
"the corresponding warning is logged. You should avoid " "the corresponding warning is logged. You should avoid "
"frequent cache clearance, because this degrades " "frequent cache clearance, because this degrades "
"performance. The default value is '1000'.")}}, "performance. The default value is '1000'. "
"Several modules have a similar option; and some core "
"ejabberd parts support similar options too, see "
"'auth_cache_size', 'oauth_cache_size', "
"'router_cache_size', and 'sm_cache_size'.")}},
{use_cache, {use_cache,
#{value => "true | false", #{value => "true | false",
desc => ?T("Enable or disable cache. The default is 'true'.")}}, desc =>
?T("Enable or disable cache. The default is 'true'. "
"Several modules have a similar option; and some core "
"ejabberd parts support similar options too, see "
"'auth_use_cache', 'oauth_use_cache', 'router_use_cache', "
"and 'sm_use_cache'.")}},
{default_db, {default_db,
#{value => "mnesia | sql", #{value => "mnesia | sql",
desc => desc =>

View File

@ -925,6 +925,10 @@ mod_doc() ->
"Configured users can perform these actions with an XMPP " "Configured users can perform these actions with an XMPP "
"client either using Ad-hoc Commands or sending messages " "client either using Ad-hoc Commands or sending messages "
"to specific JIDs."), "", "to specific JIDs."), "",
?T("Note that this module can be resource intensive on large "
"deployments as it may broadcast a lot of messages. This module "
"should be disabled for instances of ejabberd with hundreds of "
"thousands users."), "",
?T("The Ad-hoc Commands are listed in the Server Discovery. " ?T("The Ad-hoc Commands are listed in the Server Discovery. "
"For this feature to work, 'mod_adhoc' must be enabled."), "", "For this feature to work, 'mod_adhoc' must be enabled."), "",
?T("The specific JIDs where messages can be sent are listed below. " ?T("The specific JIDs where messages can be sent are listed below. "

View File

@ -85,13 +85,18 @@ mod_options(_Host) ->
mod_doc() -> mod_doc() ->
#{desc => #{desc =>
?T("This module is an implementation of " [?T("This module is an implementation of "
"https://xmpp.org/extensions/xep-0355.html" "https://xmpp.org/extensions/xep-0355.html"
"[XEP-0355: Namespace Delegation]. " "[XEP-0355: Namespace Delegation]. "
"Only admin mode has been implemented by now. " "Only admin mode has been implemented by now. "
"Namespace delegation allows external services to " "Namespace delegation allows external services to "
"handle IQ using specific namespace. This may be applied " "handle IQ using specific namespace. This may be applied "
"for external PEP service."), "for external PEP service."), "",
?T("WARNING: Security issue: Namespace delegation gives components "
"access to sensitive data, so permission should be granted "
"carefully, only if you trust the component."), "",
?T("NOTE: This module is complementary to 'mod_privilege' but can "
"also be used separately.")],
opts => opts =>
[{namespaces, [{namespaces,
#{value => "{Namespace: Options}", #{value => "{Namespace: Options}",
@ -109,6 +114,10 @@ mod_doc() ->
?T("The option defines which components are allowed " ?T("The option defines which components are allowed "
"for namespace delegation. The default value is 'none'.")}}]}], "for namespace delegation. The default value is 'none'.")}}]}],
example => example =>
[{?T("Make sure you do not delegate the same namespace to several "
"services at the same time. As in the example provided later, "
"to have the 'sat-pubsub.example.org' component perform "
"correctly disable the 'mod_pubsub' module."),
["access_rules:", ["access_rules:",
" external_pubsub:", " external_pubsub:",
" allow: external_component", " allow: external_component",
@ -126,7 +135,7 @@ mod_doc() ->
" urn:xmpp:mam:1:", " urn:xmpp:mam:1:",
" access: external_mam", " access: external_mam",
" http://jabber.org/protocol/pubsub:", " http://jabber.org/protocol/pubsub:",
" access: external_pubsub"]}. " access: external_pubsub"]}]}.
depends(_, _) -> depends(_, _) ->
[]. [].

View File

@ -263,7 +263,13 @@ mod_doc() ->
"record of authentication failures after some time since the " "record of authentication failures after some time since the "
"first failure or on a successful authentication. " "first failure or on a successful authentication. "
"It also does not simply block network traffic, but " "It also does not simply block network traffic, but "
"provides the client with a descriptive error message.")], "provides the client with a descriptive error message."), "",
?T("WARNING: You should not use this module behind a proxy or load "
"balancer. ejabberd will see the failures as coming from the "
"load balancer and, when the threshold of auth failures is "
"reached, will reject all connections coming from the load "
"balancer. You can lock all your user base out of ejabberd "
"when using this module behind a proxy.")],
opts => opts =>
[{access, [{access,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),

View File

@ -524,5 +524,13 @@ mod_options(_) ->
mod_doc() -> mod_doc() ->
#{desc => #{desc =>
?T("This module provides a ReST API to call " [?T("This module provides a ReST API to call ejabberd commands "
"ejabberd commands using JSON data.")}. "using JSON data."), "",
?T("To use this module, in addition to adding it to the 'modules' "
"section, you must also add it to 'request_handlers' of some "
"listener."), "",
?T("To use a specific API version N, when defining the URL path "
"in the request_handlers, add a 'vN'. "
"For example: '/api/v2: mod_http_api'"), "",
?T("To run a command, send a POST request to the corresponding "
"URL: 'http://localhost:5280/api/<command_name>'")]}.

View File

@ -130,6 +130,10 @@ mod_doc() ->
"the specified soft quota (see 'access_soft_quota'). " "the specified soft quota (see 'access_soft_quota'). "
"The default value is 'hard_upload_quota'.")}}], "The default value is 'hard_upload_quota'.")}}],
example => example =>
[{?T("Please note that it's not necessary to specify the "
"'access_hard_quota' and 'access_soft_quota' options in order "
"to use the quota feature. You can stick to the default names "
"and just specify access rules such as those in this example:"),
["shaper_rules:", ["shaper_rules:",
" ...", " ...",
" soft_upload_quota:", " soft_upload_quota:",
@ -143,7 +147,7 @@ mod_doc() ->
" mod_http_upload: {}", " mod_http_upload: {}",
" mod_http_upload_quota:", " mod_http_upload_quota:",
" max_days: 100", " max_days: 100",
" ..."]}. " ..."]}]}.
-spec depends(binary(), gen_mod:opts()) -> [{module(), hard | soft}]. -spec depends(binary(), gen_mod:opts()) -> [{module(), hard | soft}].
depends(_Host, _Opts) -> depends(_Host, _Opts) ->

View File

@ -107,6 +107,10 @@ mod_doc() ->
"yet ready to use in production. It's asserted that " "yet ready to use in production. It's asserted that "
"the MIX protocol is going to replace the MUC protocol " "the MIX protocol is going to replace the MUC protocol "
"in the future (see 'mod_muc')."), "", "in the future (see 'mod_muc')."), "",
?T("To learn more about how to use that feature, you can refer to "
"our tutorial: https://docs.ejabberd.im/tutorials/mix-010/"
"[Getting started with XEP-0369: Mediated Information "
"eXchange (MIX) v0.1]."), "",
?T("The module depends on 'mod_mam'.")], ?T("The module depends on 'mod_mam'.")],
opts => opts =>
[{access_create, [{access_create,

View File

@ -1280,9 +1280,20 @@ mod_options(Host) ->
mod_doc() -> mod_doc() ->
#{desc => #{desc =>
?T("This module provides support for https://xmpp.org/extensions/xep-0045.html" [?T("This module provides support for https://xmpp.org/extensions/xep-0045.html"
"[XEP-0045: Multi-User Chat]. Users can discover existing rooms, " "[XEP-0045: Multi-User Chat]. Users can discover existing rooms, "
"join or create them. Occupants of a room can chat in public or have private chats."), "join or create them. Occupants of a room can chat in public or have private chats."), "",
?T("The MUC service allows any Jabber ID to register a nickname, so "
"nobody else can use that nickname in any room in the MUC "
"service. To register a nickname, open the Service Discovery in "
"your XMPP client and register in the MUC service."), "",
?T("This module supports clustering and load balancing. One module "
"can be started per cluster node. Rooms are distributed at "
"creation time on all available MUC module instances. The "
"multi-user chat module is clustered but the rooms themselves "
"are not clustered nor fault-tolerant: if the node managing a "
"set of rooms goes down, the rooms disappear and they will be "
"recreated on an available node on first connection attempt.")],
opts => opts =>
[{access, [{access,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),

View File

@ -100,6 +100,12 @@ mod_doc() ->
"It is worth noting that the permissions grant access to " "It is worth noting that the permissions grant access to "
"the component to a specific data type for all users of " "the component to a specific data type for all users of "
"the virtual host on which 'mod_privilege' is loaded."), "", "the virtual host on which 'mod_privilege' is loaded."), "",
?T("Make sure you have a listener configured to connect your "
"component. Check the section about listening ports for more "
"information."), "",
?T("WARNING: Security issue: Privileged access gives components "
"access to sensitive data, so permission should be granted "
"carefully, only if you trust a component."), "",
?T("NOTE: This module is complementary to 'mod_delegation', " ?T("NOTE: This module is complementary to 'mod_delegation', "
"but can also be used separately.")], "but can also be used separately.")],
opts => opts =>

View File

@ -628,7 +628,10 @@ mod_doc() ->
"This protocol enables end users to use a XMPP client to:"), "", "This protocol enables end users to use a XMPP client to:"), "",
?T("* Register a new account on the server."), "", ?T("* Register a new account on the server."), "",
?T("* Change the password from an existing account on the server."), "", ?T("* Change the password from an existing account on the server."), "",
?T("* Delete an existing account on the server.")], ?T("* Delete an existing account on the server."), "",
?T("This module reads also another option defined globally for the "
"server: 'registration_timeout'. Please check that option "
"documentation in the section with top-level options.")],
opts => opts =>
[{access, [{access,
#{value => ?T("AccessName"), #{value => ?T("AccessName"),

View File

@ -625,5 +625,13 @@ mod_doc() ->
?T("- Register a new account on the server."), "", ?T("- Register a new account on the server."), "",
?T("- Change the password from an existing account on the server."), "", ?T("- Change the password from an existing account on the server."), "",
?T("- Delete an existing account on the server."), "", ?T("- Delete an existing account on the server."), "",
?T("This module supports CAPTCHA image to register a new account. "
"To enable this feature, configure the options 'captcha\_cmd' "
"and 'captcha\_host', which are documented in the section with "
"top-level options."), "",
?T("As an example usage, the users of the host 'example.org' can "
"visit the page: 'https://example.org:5281/register/' It is "
"important to include the last / character in the URL, "
"otherwise the subpages URL will be incorrect."), "",
?T("The module depends on 'mod_register' where all the configuration " ?T("The module depends on 'mod_register' where all the configuration "
"is performed.")]}. "is performed.")]}.

View File

@ -654,10 +654,12 @@ mod_doc() ->
?T("- Connection parameters: The module also accepts the " ?T("- Connection parameters: The module also accepts the "
"connection parameters, all of which default to the top-level " "connection parameters, all of which default to the top-level "
"parameter of the same name, if unspecified. " "parameter of the same name, if unspecified. "
"See 'LDAP Connection' for more information about them."), "", "See http://../database-ldap/#ldap-connection[LDAP Connection] "
?T("The ejabberd Guide includes details for retrieving the roster, " "section for more information about them."), "",
"configuration examples including Flat DIT and Deep DIT, and " ?T("Check also the http://../database-ldap/#configuration-examples"
"also describes some of those options in more detail.")], "[Configuration examples] section to get details about "
"retrieving the roster, "
"and configuration examples including Flat DIT and Deep DIT.")],
opts => opts =>
[ [
%% Filters: %% Filters:
@ -683,12 +685,14 @@ mod_doc() ->
?T("\"User Filter\", used for retrieving the human-readable " ?T("\"User Filter\", used for retrieving the human-readable "
"name of roster entries (usually full names of people in " "name of roster entries (usually full names of people in "
"the roster). See also the parameters 'ldap_userdesc' and " "the roster). See also the parameters 'ldap_userdesc' and "
"'ldap_useruid'. For details check the ejabberd Guide.")}}, "'ldap_useruid'. For more information check the LDAP "
"http://../database-ldap/#filters[Filters] section.")}},
{ldap_filter, {ldap_filter,
#{desc => #{desc =>
?T("Additional filter which is AND-ed together " ?T("Additional filter which is AND-ed together "
"with \"User Filter\" and \"Group Filter\". " "with \"User Filter\" and \"Group Filter\". "
"For details please read the ejabberd Guide.")}}, "For more information check the LDAP "
"http://../database-ldap/#filters[Filters] section.")}},
%% Attributes: %% Attributes:
{ldap_groupattr, {ldap_groupattr,
#{desc => #{desc =>
@ -739,17 +743,16 @@ mod_doc() ->
{ldap_memberattr_format_re, {ldap_memberattr_format_re,
#{desc => #{desc =>
?T("A regex for extracting user ID from the value of the " ?T("A regex for extracting user ID from the value of the "
"attribute named by 'ldap_memberattr'. For details " "attribute named by 'ldap_memberattr'. Check the LDAP "
"please read the ejabberd Guide.")}}, "http://../database-ldap/#control-parameters"
"[Control Parameters] section.")}},
{ldap_auth_check, {ldap_auth_check,
#{value => "true | false", #{value => "true | false",
desc => desc =>
?T("Whether the module should check (via the ejabberd " ?T("Whether the module should check (via the ejabberd "
"authentication subsystem) for existence of each user in " "authentication subsystem) for existence of each user in "
"the shared LDAP roster. See section " "the shared LDAP roster. Set to 'false' if you want to "
"'mod_shared_roster_ldap' for more information. Set to " "disable the check. Default value is 'true'.")}}] ++
"'false' if you want to disable the check. "
"Default value is 'true'.")}}] ++
[{Opt, [{Opt,
#{desc => #{desc =>
{?T("Same as top-level '~s' option, but " {?T("Same as top-level '~s' option, but "