liquid_feedback_frontend
diff config/example.lua @ 1656:3fb752f4afcb
Cleanup of configuration files
author | bsw |
---|---|
date | Sun Feb 14 12:46:39 2021 +0100 (2021-02-14) |
parents | 32cc544d5a5b |
children | 36fb14503a84 |
line diff
1.1 --- a/config/example.lua Fri Feb 12 17:59:21 2021 +0100 1.2 +++ b/config/example.lua Sun Feb 14 12:46:39 2021 +0100 1.3 @@ -4,40 +4,7 @@ 1.4 1.5 -- Name of this instance, defaults to name of config file 1.6 -- ------------------------------------------------------------------------ 1.7 -config.instance_name = "Instance name" 1.8 - 1.9 - 1.10 --- Information about service provider (HTML) 1.11 --- ------------------------------------------------------------------------ 1.12 -config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" 1.13 - 1.14 - 1.15 --- A HTML formatted text the user has to accept while registering 1.16 --- ------------------------------------------------------------------------ 1.17 -config.use_terms = "<h1>Terms of Use</h1><p>Insert terms here</p>" 1.18 - 1.19 - 1.20 --- Checkbox(es) the user has to accept while registering 1.21 --- ------------------------------------------------------------------------ 1.22 ---[[ 1.23 -config.use_terms_checkboxes = { 1.24 - { 1.25 - name = "terms_of_use_v1", 1.26 - html = "I accept the terms of use.", 1.27 - not_accepted_error = "You have to accept the terms of use to be able to register." 1.28 - }, 1.29 - { 1.30 - name = "extra_terms_of_use_v1", 1.31 - html = "I accept the extra terms of use.", 1.32 - not_accepted_error = "You have to accept the extra terms of use to be able to register." 1.33 - } 1.34 -} 1.35 ---]] 1.36 - 1.37 --- Absolute base url of application 1.38 --- ------------------------------------------------------------------------ 1.39 -config.absolute_base_url = "http://example.com/" 1.40 -config.localhost = false 1.41 +config.instance_name = "Example Organisation" 1.42 1.43 1.44 -- Connection information for the LiquidFeedback database 1.45 @@ -45,31 +12,32 @@ 1.46 config.database = { engine='postgresql', dbname='liquid_feedback' } 1.47 1.48 1.49 --- Location of the rocketwiki binaries 1.50 +-- Absolute base url of application 1.51 +-- ------------------------------------------------------------------------ 1.52 +config.absolute_base_url = "https://example.org/" 1.53 + 1.54 + 1.55 +-- Network interface to bind to 1.56 +-- ------------------------------------------------------------------------ 1.57 +-- Available options: 1.58 +-- true: bind to localhost (default) 1.59 +-- false: bind to all interface 1.60 -- ------------------------------------------------------------------------ 1.61 -config.enforce_formatting_engine = "markdown2" 1.62 -config.formatting_engines = { 1.63 - { id = "markdown2", 1.64 - name = "python-markdown2", 1.65 - executable = "markdown2", 1.66 - args = {'-s', 'escape', '-x', 'nofollow,wiki-tables'}, 1.67 - remove_images = true 1.68 - }, 1.69 --- { id = "markdown_py", 1.70 --- name = "Python Markdown", 1.71 --- executable = "markdown_py", 1.72 --- args = {'-s', 'escape', '-x', 'extra', '-x', 'nl2br', '-x', 'sane_lists'}, 1.73 --- remove_images = true 1.74 --- }, 1.75 --- { id = "rocketwiki", 1.76 --- name = "RocketWiki", 1.77 --- executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb" 1.78 --- }, 1.79 --- { id = "compat", 1.80 --- name = "Traditional WIKI syntax", 1.81 --- executable = "/opt/rocketwiki-lqfb/rocketwiki-lqfb-compat" 1.82 --- }, 1.83 -} 1.84 +-- config.localhost = true 1.85 + 1.86 + 1.87 +-- Network port to bind to, default port 8080 1.88 +-- ------------------------------------------------------------------------ 1.89 +-- config.port = 8080 1.90 + 1.91 + 1.92 +-- Serving content via IPV6 1.93 +-- ------------------------------------------------------------------------ 1.94 +-- Available options: 1.95 +-- nil or false: do not serve via IPv6 (default) 1.96 +-- true: serve via IPv6 1.97 +-- ------------------------------------------------------------------------ 1.98 +-- config.ipv6 = false 1.99 1.100 1.101 -- Public access level 1.102 @@ -88,7 +56,12 @@ 1.103 -- "everything" 1.104 -- -> Show everything a member can see, including profile pages 1.105 -- ------------------------------------------------------------------------ 1.106 -config.public_access = "authors_pseudonymous" 1.107 +config.public_access = "none" 1.108 + 1.109 + 1.110 +-- Information about service provider (HTML) 1.111 +-- ------------------------------------------------------------------------ 1.112 +config.app_service_provider = "Snake Oil<br/>10000 Berlin<br/>Germany" 1.113 1.114 1.115 1.116 @@ -97,15 +70,6 @@ 1.117 -- Remove leading -- to use a option 1.118 -- ======================================================================== 1.119 1.120 --- Disable registration 1.121 --- ------------------------------------------------------------------------ 1.122 --- Available options: 1.123 --- false: registration is enabled (default) 1.124 --- true: registration is disabled 1.125 --- ------------------------------------------------------------------------ 1.126 --- config.disable_registration = true 1.127 - 1.128 - 1.129 -- List of enabled languages, defaults to available languages 1.130 -- ------------------------------------------------------------------------ 1.131 -- config.enabled_languages = { 'en', 'de', 'eo', 'el', 'hu', 'it', 'ka', 'nl', 'zh-Hans', 'zh-TW' } 1.132 @@ -116,6 +80,35 @@ 1.133 -- config.default_lang = "en" 1.134 1.135 1.136 +-- Disable registration 1.137 +-- ------------------------------------------------------------------------ 1.138 +-- Available options: 1.139 +-- false: registration is enabled (default) 1.140 +-- true: registration is disabled 1.141 +-- ------------------------------------------------------------------------ 1.142 +-- config.disable_registration = true 1.143 + 1.144 + 1.145 +-- A HTML formatted text the user has to accept while registering 1.146 +-- ------------------------------------------------------------------------ 1.147 +-- config.use_terms = "<h1>Terms of Use</h1><p>Insert terms here</p>" 1.148 + 1.149 + 1.150 +-- Checkbox(es) the user has to accept while registering 1.151 +-- ------------------------------------------------------------------------ 1.152 +-- config.use_terms_checkboxes = { 1.153 +-- { 1.154 +-- name = "terms_of_use_v1", 1.155 +-- html = "I accept the terms of use.", 1.156 +-- not_accepted_error = "You have to accept the terms of use to be able to register." 1.157 +-- }, 1.158 +-- { 1.159 +-- name = "extra_terms_of_use_v1", 1.160 +-- html = "I accept the extra terms of use.", 1.161 +-- not_accepted_error = "You have to accept the extra terms of use to be able to register." 1.162 +-- } 1.163 +-- } 1.164 + 1.165 -- after how long is a user considered inactive and the trustee will see warning, 1.166 -- notation is according to postgresql intervals, default: no warning at all 1.167 -- ------------------------------------------------------------------------ 1.168 @@ -125,8 +118,8 @@ 1.169 -- after which time a user is advised (_soft) or forced (_hard) to check 1.170 -- unit and area delegations. default: no check at all 1.171 -- ------------------------------------------------------------------------ 1.172 +-- config.check_delegations_interval_soft = "3 months" 1.173 -- config.check_delegations_interval_hard = "6 months" 1.174 --- config.check_delegations_interval_soft = "3 months" 1.175 1.176 1.177 -- default option when checking delegations 1.178 @@ -174,11 +167,6 @@ 1.179 -- config.password_hash_max_rounds = 20000 1.180 1.181 1.182 --- Supply custom url for avatar/photo delivery 1.183 --- ------------------------------------------------------------------------ 1.184 --- config.fastpath_url_func = nil 1.185 - 1.186 - 1.187 -- Local directory for database dumps offered for download 1.188 -- ------------------------------------------------------------------------ 1.189 -- config.download_dir = nil 1.190 @@ -197,6 +185,32 @@ 1.191 -- photo = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end 1.192 --} 1.193 1.194 +-- Initiative attachments 1.195 +-- ------------------------------------------------------------------------ 1.196 +-- config.attachments = {} 1.197 + 1.198 +-- Conversion function for recoding attachments 1.199 +-- ------------------------------------------------------------------------ 1.200 +-- config.attachments.convert_func = function(data) 1.201 +-- return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") 1.202 +-- end 1.203 + 1.204 +-- Custom UI colors, defaults to green/blue 1.205 +-- ------------------------------------------------------------------------ 1.206 +-- config.style = { 1.207 +-- color_md = { 1.208 +-- primary = "green", 1.209 +-- primary_contrast = "dark", 1.210 +-- accent = "blue", 1.211 +-- accent_contrast = "dark" 1.212 +-- } 1.213 +-- } 1.214 + 1.215 +-- Member profile fields, defaults to no extra fields 1.216 +-- ------------------------------------------------------------------------ 1.217 +-- config.member_profile_fields = {} 1.218 + 1.219 + 1.220 1.221 -- Display a html formatted public message of the day 1.222 -- ------------------------------------------------------------------------ 1.223 @@ -208,16 +222,6 @@ 1.224 -- config.motd_intern = "<h1>Message of the day (intern)</h1><p>The MOTD is formatted with HTML</p>" 1.225 1.226 1.227 --- Integration of Etherpad, disabled by default 1.228 --- ------------------------------------------------------------------------ 1.229 ---config.etherpad = { 1.230 --- base_url = "http://example.com:9001/", 1.231 --- api_base = "http://localhost:9001/", 1.232 --- api_key = "mysecretapikey", 1.233 --- group_id = "mygroupname", 1.234 --- cookie_path = "/" 1.235 ---} 1.236 - 1.237 1.238 -- Free timings 1.239 -- ------------------------------------------------------------------------ 1.240 @@ -264,121 +268,6 @@ 1.241 } 1.242 --]] 1.243 1.244 --- Configuration of lf4rcs 1.245 --- ------------------------------------------------------------------------ 1.246 --- config.lf4rc = {} 1.247 - 1.248 --- Example configuration for controlling a Git repository 1.249 ---[[ 1.250 -config.lf4rcs.git = { 1.251 - 1.252 - render_draft_reference = function(url, draft) 1.253 - if not draft.external_reference then return end 1.254 - ui.tag{ content = _"Changeset:" } 1.255 - slot.put(" ") 1.256 - ui.link{ 1.257 - text = draft.external_reference, 1.258 - external = url .. ";a=commit;h=" .. draft.external_reference 1.259 - } 1.260 - end, 1.261 - 1.262 - get_remote_user = function() 1.263 - return os.getenv("REMOTE_USER") 1.264 - end, 1.265 - 1.266 - get_branches = function(path, exec) 1.267 - local branches = {} 1.268 - for line in io.lines() do 1.269 - local oldrev, newrev, branch = string.match(line, "([^ ]+) ([^ ]+) refs/heads/(.+)") 1.270 - if not branch then 1.271 - return nil, "unexpected format from git hook environment" 1.272 - end 1.273 - branches[branch] = { newrev } 1.274 - end 1.275 - return branches 1.276 - end, 1.277 - 1.278 - commit = function(path, exec, branch, target_node_id, close_message, merge_message) 1.279 - if merge_message then 1.280 - exec("git", "-C", path, "checkout", "-f", "master") 1.281 - exec("git", "-C", path, "merge", target_node_id, "-m", merge_message) 1.282 - exec("git", "-C", path, "push", "origin", "master") 1.283 - end 1.284 - end 1.285 - 1.286 -} 1.287 - 1.288 --- Example configuration for controlling a Mercurial repository 1.289 -config.lf4rcs.hg = { 1.290 - 1.291 - working_branch_name = "work", 1.292 - 1.293 - render_draft_reference = function(url, draft) 1.294 - if not draft.external_reference then return end 1.295 - ui.tag{ content = _"Changeset graph:" } 1.296 - slot.put(" ") 1.297 - ui.link{ 1.298 - text = draft.external_reference, 1.299 - external = url .. "/graph/" .. draft.external_reference 1.300 - } 1.301 - end, 1.302 - 1.303 - get_remote_user = function() 1.304 - return os.getenv("REMOTE_USER") 1.305 - end, 1.306 - 1.307 - get_branches = function(path, exec) 1.308 - local first_node_id = os.getenv("HG_NODE") 1.309 - if not first_node_id then 1.310 - return nil, "internal error, no first node ID available" 1.311 - end 1.312 - local hg_log = exec( 1.313 - "hg", "log", "-R", path, "-r", first_node_id .. ":", "--template", "{branches}\n" 1.314 - ) 1.315 - local branches = {} 1.316 - for branch in hg_log:gmatch("(.-)\n") do 1.317 - if branch == "" then branch = "default" end 1.318 - if not branches[branch] then 1.319 - branches[branch] = {} 1.320 - local head_lines = exec( 1.321 - "hg", "heads", "-R", path, "--template", "{node}\n", branch 1.322 - ) 1.323 - for node_id in string.gmatch(head_lines, "[^\n]+") do 1.324 - table.insert(branches[branch], node_id) 1.325 - end 1.326 - end 1.327 - end 1.328 - return branches 1.329 - end, 1.330 - 1.331 - extra_checks = function(path, exec) 1.332 - local result = exec("hg", "heads", "-t", "-c") 1.333 - for branch in string.gmatch(result, "[^\n]+") do 1.334 - if branch == lf4rcs.config.hg.working_branch_name then 1.335 - return nil, "open head found for branch " .. lf4rcs.config.hg.working_branch_name 1.336 - end 1.337 - end 1.338 - return true 1.339 - end, 1.340 - 1.341 - commit = function(path, exec, branch, target_node_id, close_message, merge_message) 1.342 - exec("hg", "up", "-R", path, "-C", "-r", target_node_id) 1.343 - exec("hg", "commit", "-R", path, "--close-branch", "-m", close_message) 1.344 - if merge_message then 1.345 - exec("hg", "up", "-R", path, "-C", "-r", "default") 1.346 - exec("hg", "merge", "-R", path, "-r", "tip") 1.347 - exec("hg", "commit", "-R", path, "-m", merge_message) 1.348 - end 1.349 - end 1.350 - 1.351 -} 1.352 - 1.353 --- Grace period after creating an initiative for pushing changes during verification phase 1.354 --- disabled by default (nil), use PostgreSQL interval notation 1.355 --- config.lf4rcs.push_grace_period = nil 1.356 - 1.357 -lf4rcs.init() 1.358 ---]] 1.359 1.360 -- External references 1.361 -- ------------------------------------------------------------------------ 1.362 @@ -399,45 +288,44 @@ 1.363 end 1.364 --]] 1.365 1.366 + 1.367 +-- Configuration of OAuth2 service, defaults to OAuth2 disabled 1.368 +-- ------------------------------------------------------------------------ 1.369 +-- config.oauth2 = {} 1.370 + 1.371 +-- Additional scopes 1.372 +-- config.oauth2.available_scopes = { 1.373 +-- { scope = "privA", name = { de = "Beispielprivileg A", en = "Example privilege A" } }, 1.374 +-- { scope = "privB", name = { de = "Beispielprivileg B", en = "Example privilege B" } } 1.375 +-- } 1.376 + 1.377 +-- OAuth2 endpoint magic string for dynamic app registration 1.378 +-- ------------------------------------------------------------------------ 1.379 +-- config.oauth2.endpoint_magic = "liquidfeedback_client_redirection_endpoint" 1.380 + 1.381 +-- OAuth2 Token lifetime and timings 1.382 +-- ------------------------------------------------------------------------ 1.383 +-- config.oauth2.authorization_code_lifetime = 5 * 60 1.384 +-- config.oauth2.refresh_token_lifetime = 60 * 60 * 24 * 30 * 3 1.385 +-- config.oauth2.refresh_pause = 60 1.386 +-- config.oauth2.refresh_grace_period = 60 1.387 +-- config.oauth2.access_token_lifetime = 60 * 60 1.388 + 1.389 + 1.390 + 1.391 -- Admin logger 1.392 -- ------------------------------------------------------------------------ 1.393 -- Logging administrative activities 1.394 -- disabled by default 1.395 1.396 ---[[ 1.397 -config.admin_logger = function(params) 1.398 - 1.399 - local adminid = app.session.member_id 1.400 - local adminname = app.session.member.name 1.401 - local url = params._webmcp_path 1.402 - 1.403 - -- do something (e.g. calling 'logger' via extos.pfilter) 1.404 - 1.405 -end 1.406 ---]] 1.407 +-- config.admin_logger = function(params) 1.408 +-- local adminid = app.session.member_id 1.409 +-- local adminname = app.session.member.name 1.410 +-- local url = params._webmcp_path 1.411 +-- -- do something (e.g. calling 'logger' via extos.pfilter) 1.412 +-- end 1.413 1.414 1.415 --- Network interface to bind to 1.416 --- ------------------------------------------------------------------------ 1.417 --- Available options: 1.418 --- true: bind to localhost (default) 1.419 --- false: bind to all interface 1.420 --- ------------------------------------------------------------------------ 1.421 --- config.localhost = true 1.422 - 1.423 - 1.424 --- Network port to bind to 1.425 --- ------------------------------------------------------------------------ 1.426 --- config.port = 8080 1.427 - 1.428 - 1.429 --- Serving content via IPV6 1.430 --- ------------------------------------------------------------------------ 1.431 --- Available options: 1.432 --- nil or false: do not serve via IPv6 (default) 1.433 --- true: serve via IPv6 1.434 --- ------------------------------------------------------------------------ 1.435 --- config.ipv6 = false 1.436 1.437 1.438 -- Application server fork configuration 1.439 @@ -483,28 +371,42 @@ 1.440 -- ------------------------------------------------------------------------ 1.441 -- uncomment the following line to enable debug trace 1.442 -- ------------------------------------------------------------------------ 1.443 -config.enable_debug_trace = true 1.444 +-- config.enable_debug_trace = true 1.445 + 1.446 + 1.447 +-- Configuration of lf4rcs, disabled by default 1.448 +-- for example configration see _lf4rcs.lua 1.449 +-- ------------------------------------------------------------------------ 1.450 +-- execute.config("_lf4rcs") 1.451 + 1.452 + 1.453 +-- Configuration of ldap authentication, disabled by default 1.454 +-- for example configration, see _ldap.lua 1.455 +-- for active directory example, see _ldap_ad.lua 1.456 +-- ------------------------------------------------------------------------ 1.457 +-- execute.config("_ldap") 1.458 +-- execute.config("_ldap_ad") 1.459 1.460 1.461 -config.fork = { 1.462 - pre =1, min = 1, max = 1, max_requests = 1, min_requests = 1 1.463 -} 1.464 - 1.465 -config.localhost = true 1.466 +-- Integration of Etherpad, disabled by default 1.467 +-- ------------------------------------------------------------------------ 1.468 +--config.etherpad = { 1.469 +-- base_url = "http://example.com:9001/", 1.470 +-- api_base = "http://localhost:9001/", 1.471 +-- api_key = "mysecretapikey", 1.472 +-- group_id = "mygroupname", 1.473 +-- cookie_path = "/" 1.474 +--} 1.475 1.476 -config.oauth2 = { 1.477 - available_scopes = { 1.478 - { scope = "read", name = { de = "Lesen", en = "Read data" } }, 1.479 - { scope = "write", name = { de = "Schreiben", en = "Write data" } }, 1.480 - { scope = "privA", name = { de = "Beispielprivileg A", en = "Example privilege A" } }, 1.481 - { scope = "privB", name = { de = "Beispielprivileg B", en = "Example privilege B" } } 1.482 - }, 1.483 - authorization_code_lifetime = 5 * 60, 1.484 - refresh_token_lifetime = 60 * 60 * 24 * 30 * 3, 1.485 - refresh_pause = 60, 1.486 - refresh_grace_period = 60, 1.487 - access_token_lifetime = 60 * 60, 1.488 - -- NOTE for init.lua : check for refresh_pause >= refresh_grace_period 1.489 - endpoint_magic = "liquidfeedback_client_redirection_endpoint" 1.490 +-- Integration of FirstLife 1.491 +-- ------------------------------------------------------------------------ 1.492 +--[[ 1.493 +config.firstlife = { 1.494 + coordinates = "", 1.495 + areaviewer_url = "about:blank", 1.496 + inputmap_url = "about:blank" 1.497 } 1.498 +config.allow_new_draft_callback = true 1.499 +--]] 1.500 1.501 +