Mercurial > prosody-modules
annotate mod_muc_defaults/README.markdown @ 5418:f2c7bb3af600
mod_http_oauth2: Add role selector to consent page
List includes all roles available to the user, if more than one.
Defaults to either the first role in the scope string or the users
primary role.
Earlier draft listed all roles, but having options that can't be
selected is bad UX and the entire list of all roles on the server could
be long, and perhaps even sensitive.
Allows e.g. picking a role with fewer permissions than what might
otherwise have been selected.
UX wise, doing this with more checkboxes or possibly radio buttons would
have been confusion and/or looked messier.
Fixes the previous situation where unselecting a role would default to
the primary role, which could be more permissions than requested.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 05 May 2023 01:23:13 +0200 |
parents | 22784f001b7f |
children | a1f8cc591b66 |
rev | line source |
---|---|
3586
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
1 # mod_muc_defaults |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
2 |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
3 Creates MUCs with default configuration settings upon Prosody startup. |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
4 |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
5 ## Configuration |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
6 |
3999 | 7 Under your MUC component, add a `muc_defaults` option with the relevant settings. |
3586
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
8 |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
9 ``` |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
10 Component "conference.example.org" "muc" |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
11 modules_enabled = { |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
12 "muc_defaults"; |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
13 } |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
14 |
3999 | 15 muc_defaults = { |
3586
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
16 { |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
17 jid_node = "trollbox", |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
18 affiliations = { |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
19 admin = { "admin@example.org", "superuser@example.org" }, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
20 owner = { "owner@example.org" }, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
21 visitors = { "visitor@example.org" } |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
22 }, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
23 config = { |
3623
da2d58208574
mod_muc_defaults: Allow setting of `name` and `description
JC Brand <jc@opkode.com>
parents:
3586
diff
changeset
|
24 name = "General Chat", |
da2d58208574
mod_muc_defaults: Allow setting of `name` and `description
JC Brand <jc@opkode.com>
parents:
3586
diff
changeset
|
25 description = "Public chatroom with no particular topic", |
3586
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
26 allow_member_invites = false, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
27 change_subject = false, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
28 history_length = 40, |
3623
da2d58208574
mod_muc_defaults: Allow setting of `name` and `description
JC Brand <jc@opkode.com>
parents:
3586
diff
changeset
|
29 lang = "en", |
3586
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
30 logging = true, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
31 members_only = false, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
32 moderated = false, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
33 persistent = true, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
34 public = true, |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
35 public_jids = true |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
36 } |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
37 } |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
38 }; |
796b29911747
mod_muc_defaults: Create MUCs from config
JC Brand <jc@opkode.com>
parents:
diff
changeset
|
39 ``` |